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
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.