justjs: node.js tutorials

5/14 '12

Welcome to the first installment of justjs.com, a highly autobiographical blog about full-stack web development in node.js, MongoDB and JavaScript!

I've known lots of web development languages. Trust me... lots. So why code in JavaScript? It begins with one word:

Frustration

This blog is motivated by my own frustration with the constant "context switching" that comes with the use of separate backend and frontend programming languages. And not only that, but also a profusion of configuration file formats and templating languages jostling for space in my skull.

Taken individually, they all add value. Collectively, they make programming a frustrating exercise in remembering the rules of the environment you're in at the moment.

Meanwhile, all of these tools slow everything down! In the name of making it friendlier, speeding it up, or both. In the name of making things friendlier, many web frameworks and programming languages sacrifice performance. And in the name of speeding things up again, many frameworks try too hard to cache everything magically behind the scenes - creating tools that are fast in production but painfully slow in the "dev" environment.

Motivation

These are gripes. Gripes don't normally motivate people to tackle entirely new paradigms.

But for the past several years I've watched the web browser vendors compete tooth and nail to make JavaScript faster and faster and faster. I've watched as the JavaScript"just in time" compilers exceeded the performance of just about all other loosely-typed, fun-to-use programming languages. And pushed beyond that to a level of performance that's tough to match in anything but C, C++ or Java.

When you consider how fast the language is today (very!) relative to the sacrifices you have to make for that speed (none!)... and when you consider that the best implementation is open source... you quickly realize that node.js was a revolution waiting to happen.

Excitation

Why? Because when I started coding in node.js, I had to patch the tools I use to measure how fast a webpage is. I had to patch them to display more decimal places in order to measure any time at all.

And because I don't spend all my time switching contexts in my head. With node.js on the server, MongoDB (with its JavaScript-based query language) for storage and Underscore's templates, I get to code in one powerful, functional and fast programming language. And in exchange for that tremendous convenience, I sacrifice...

Nothing!

Starting to see why I'm excited?

What You Can Expect From This Blog

In each installment I'll be breaking down another part of the code for you, taking you through the evolution and continued future development of justjs, demonstrating how to tackle web development tasks that are nontrivial but familiar with the power and velocity of Node.