JavaScript is dead. Long live JavaScript

I’m a freelance NodeJS engineer. I mostly specialise in backend JavaScript — RESTful APIs, IoT, basically anything that lives on a server — but I do bits of frontend too. As such, and I know there are problems with it, but I’m a big fan of JavaScript.

But the biggest problem to me is the Tower of Babel that is the frontend frameworks. This subject has been written much more elegantly and wittily than I can, but I’m going to suggest a way forward.

STOP WRITING SINGLE PAGE APPLICATIONS!!!

I’ve done my fair share of single page applications (SPAs) over the years. I’ve written plenty of Angular 1 stuff that’s still in production, I’ve played with Ember and React and whatnot and they all suffer from the same issues.

The biggest issue to my mind is that they put the strain on the client machine. This is fine when you’ve got a £1,500 quad-core I7 Macbook Pro like me, but my mother-in-law has a £350 shitbox that’s only turned on once a week. Mine can cope with it; her’s can’t. And she prefers Internet Explorer. It’s amazing, but I’ve never met an architect who considers that people still live like this.


Once upon a time, there was a way of writing web applications. You’d have your server, which took some input, did something to it and then produced some output. The whole output. From <head> to </head>.

These were easy to develop on. You knew what was on your server, so your logic different have to cater for different versions of the language you were using. And when you wanted to test on them, you ran it on your continuous integration server which created a deployable artifact for you. And if you wanted a bit of sexiness, you stuck jQuery on there and you could do some really nice things. Which made it easy to work if the browser didn’t have JavaScript enabled.

This world still exists. SPAs have a place, but not the ubiquity that they’re given. My preference is Express because it gets out of your way, but there’s loads of different ways of writing these in NodeJS (and that’s before you get into all the different languages around).

The reason I prefer backend development is because I get to choose the environment that the application runs on. Sticking all the logic on the frontend means you’ve got to test your code on a multitude of different platforms. Sure, you’ve got to do it if you’ve got some frontend jQuery, but it’s just massively less painful having a little bit of logic than your whole application.

But I still want to write an SPA because <reasons />

Fine. Use Backbone.

It’s fast, lightweight, is flexible and allows you to do some really complex things. The same is true of React, but at least Backbone doesn’t force you to learn yet-another-flavour-of-JavaScript — you don’t even need to compile a Backbone application.