The case for Node.js

Not too long ago, I wrote about JavaScript; specifically, I espoused it as a language worthy of a Java developers attention mainly due to the fact that JavaScript, while about as old as Java, is arguably the more popular language. Yes, you’ve read that correctly — JavaScript itself is probably one of the widest leveraged languages ever — scores of developers know it whether they be PHP programmers or Ruby developers or even .NET developers. You see, JavaScript makes much of what you see and do on the web work. It’s the glue of the web and as such it’s platform agnostic.

Early in my career, I spent some time as a server side JavaScript developer. At the time, there was a product on the market called Netscape Application Server and as far as I know now, it was the only product out there touting this nifty scripting language as an engine for websites. I had fun, but alas, that product didn’t last; in fact, shortly thereafter, I found myself back into the world of Java building web applications with Servlets.

So it’s with particular interest that I’ve watched a new incarnation of server side JavaScript take hold in the developer community. Node.js is still young, but undeniably exciting in that it offers a highly scalable, event-driven I/O model for building networked applications. Node.js is built to run on V8, which is an open source JavaScript engine developed by Google that compiles JavaScript into native machine code before execution, resulting in extremely fast runtime performance (something not commonly associated with JavaScript). In plain English, Node enables you to rapidly build apps that are lighting fast and highly concurrent.

As a Java developer, you might be thinking “big deal, you can do this with Java too” and you wouldn’t be wrong. Well, maybe partially. That is, Node.js is effortlessly simple to understand and its JavaScript syntax means you can save on keystrokes big time. So with a little code, you can build a blazingly fast, scalable web app that is capable of handing myriad concurrent connections. You can do that in Java, but it’ll require quite a few more lines of code and a bevy of additional libraries. Did I mention there’s an army of developers out there that already know and use JavaScript on a day-to-day basis?

Node.js will continue to rise in popularity due to its far reaching audience pull, but unlike the Visual Basic analogy that might be popping up into your head, Node.js is now and will continue to be leveraged to build real web apps (rather than little calculators, etc of the VB era). If you aren’t looking at Node.js yet, it’s high time you did.

Related: