Oh god, I built another JavaScript framework

How and why I was driven into the warm embrace of my very own web stack

How it all started

Eventually, this webpage got so complicated and unwieldy that
I started avoiding making changes to it.

What “not sucky” looks like

No configuration

Automatically including associated styles

Automatic resource compilation

Server-side bootstrapping

It was isomorphic all along

Hello world

module.exports = Controller.create({
__preload__: function(done) {
// This runs on the server side at first, but can be
// run later in the client just the same.
MyAPIClient.getThing(function(thing) {
if (!thing) {
notFound();
} else {
this.thing = thing;
}
done();
}, this);
},
__body__: function() {
return template(this.thing);
},
__ready__: function() {
// This runs only in the browser once the DOM is ready.
events.bind(dom.get(‘.thing’), ‘click’, function() {
this.doSomething();
this.rerender();
}, this);
}
});

How’s this different from X?

In closing

Pretty good at regular expressions.

Pretty good at regular expressions.