The Modern Node.js Web App and Site

As projects for the new year have started to roll in, I’ve noticed some trends in how web sites and applications are built and how they are hosted.

If you’re a one-man shop or a small company, the single most important change is the advent of cloud platforms. If you haven’t been paying attention the last few years, it’s about time. Suddenly, you no longer have to worry about system administration. Platforms such as Heroku and Google’s AppEngine might not be the cheapest, but they certainly are helpful in alleviating a lot of the pain of hosting your own web applications.

However, with cloud platforms comes a major change in development: expect failure of even the smallest component and prepare for it.

The one cardinal rule that you will ignore at first, but will learn the hard way: [tweetherder]Every component in the system will fail. You better prepare if you don’t want your users to suffer.[/tweetherder]
The good thing is, you’re site will be better for it.

With this in mind, I foresee two parallel roads in web development:

  • Highly dynamic single page apps interfacing with highly distributed stateless JSON REST services. These services scale indefinitely (almost) and are ideal for systems that fail over regularly (remember, no state). Suggested technologies: AngularJS and Backbone.js on the client. Pretty much any lightweight Node.js framework will do. For instance, Express combined with some MongoDB or PostgreSQL host.
  • Static SEO optimized read-only content. Ideally for distribution on CDNs. Jekyll is perfect for this. It isn’t anything new, before WordPress, Movable Type was already generating static sites. It’s only common sense, really. But Jekyll puts it into a nice, low-friction package. I haven’t researched the Node options, but Blacksmith, Wintersmith and DocPad look promising.

There will always be an overlap, where the choice won’t be clear. For instance, I can imagine a typical forum, that you want indexed by Google, will be an interesting exercise.

I’d love to learn about your vision for web development in 2013 and beyond. Please join me on Twitter and Facebook.