Why Node.js? Why clients should ask for it, and developers should build with it
Following my post about my new node.js apps, and since I would like to turn New Leaf Digital into a node.js shop, I should write a little about why you, perhaps a potential client with a web project, might want to have it built in node.
Node is truly lightweight: Unlike bloated Swiss army knife frameworks that try to solve every problem out of the box at the expense of performance and comprehension, a Node app starts as a completely blank slate and is only as complex as you make it. So you’ll get more bang for your server capacity buck from the get-go. (I’ve worked on several Drupal projects involving performance, getting each page to load faster by eliminating cruft and bottlenecks. In Node that whole way of thinking is flipped on its head.) Every tiny operation of your app is also light: the whole system is built on a philosophy of “asynchronous” input/output. Think of a node app as a juggler: while each ball is arcing through the air, it’s catching and throwing other balls. Interactions don’t “block” the flow like a traditional web application. So you don’t run out of capacity until you’re really out of capacity, and a bottleneck in one part of the system won’t bring down the rest of it.
This asynchronous I/O also makes node.js especially suited to applications involving file handling, interaction with external web services (as in Flashcards), or real-time user interaction (as in Interactive Lists). These are much harder to scale on traditional platforms, because the operations make other processes wait around while they’re off doing their work.
So what is node.js not good for? If you want a robust content management system out of the box for a news publication, for example, you probably want to stick with a platform like Drupal. If you want a simple blog with easy content creation tools and comments and photos, you’re still safe with Wordpress. If you’re building software for banks to transfer money across the globe, there are probably battle-hardened, traditional ways to do that.
But for almost any other web app, node.js might just be the best toolkit to build with. So please let me know when you’re plotting your next big web idea!