Is Node.js the new Java? Not that Node is bloated, but that it reminds some of Java's original small runtime … before the bloat

Date: Sat Apr 26 2014 Java

This is a nicer question than the one the other day about Node as a cancer.  A blog post, NodeJS is the new Java, suggests something about the future and present of Node.  Namely that Node is still in the small-and-nimble phase we found attractive about Java in its early days, but will Node always remain small-and-nimble?

The modern stereotype reaction to Java is that it's ugly and bloated and therefore it has to be slow.  But the word "bloat" wasn't always Java's middle name, instead it grew over the years.  Way back in the early days when the Java platform was still new the team hadn't had time yet to develop things like integrated XML support, or JDBC, or Swing, or a bunch of other large modules that were integrated into the Java SE specification.

I worked in the Java SE team for over 10 years and one way we created value for the community in each major release was to add a bunch of new features.

For example, adding the W3C XML library to Java helped vault XML to a prominent position as the most important data interchange format in the industry.  The equation of a fully portable expressive programming language and a fully portable expressive data format should have created a whole lot of synergy of goodness.  But somehow many software engineers have decided XML is ugly (it is?) and ..etc..etc..etc...

I don't want to go down that line of discussion because it's a distraction from the real point.  Java SE became synonomized with bloat, despite having a world class highly optimized amazing virtual machine (HotSpot), because of the addition of feature after feature after feature after feature.

An attractive feature of Java back in the 1.1.x days was the small number of packages.  Oh, and it was cross-platform.  Today we can say the same of Node, small number of core packages making it easy to grasp, and it's cross platform.  Node does have an advantage that it's not trying to include desktop GUI features, unlike Java.

I wonder if several years into the future whether we'll continue seeing Node remain small and nimble.  Of course Ryan Dahl and the core team has a strong vision about Node as a lightweight highly performant platform, and hopefully they'll remain true to this vision.  But there is a tendency for .. well .. I understood a long time ago that "more is a slippery slope" in that you want "more" and then "more" and so on, and eventually you might find yourself more'd into the world complaining how bloated you've become.

An advantage Node has over Java is the package management system; ably assisted it's sister project NPM.  Java never developed a good package management system, and Java's bloat could have been avoided if they had cooked up Project Jigsaw (a plan to cut the Java SE/ME specifications into a cluster of mix-and-match "profiles") back in the 1.1.x days.  Node and NPM make it possible to pick out exactly the modules your application needs, letting the Node platform focus on the core things it does.

Maybe that will be Node's saving grace …?