Why is Node.JS popular?

5 thoughts
last posted Oct. 9, 2013, 8:42 a.m.
0
get stream as: markdown or atom
0

As a contributor to a predating, superior solution, I sure wish that we could have some of Node.JS's popularity. Nevertheless, it makes total sense to me that it's popular.

Here are some reasons why.

0

It's pretty clear that JavaScript is better than C. It's even pretty clear that it's better than PHP.

It's debatable (and I would certainly debate it, in some cases) as to whether JavaScript is better than your-favorite-high-level-language, but it seems clear that JavaScript is "good enough" for server-side work.

This isn't so much a reason as a pre-emption of an argument, that JS is somehow a "toy". It's hard to reasonably make the argument that that is so: billions of dollars have been invested in improving its performance, its reliability, and those investments have been directly leveraged by Node in the form of V8.

0

JavaScript is ubiquitously deployed. Ubiquitous deployment comes along with ubiquitous education. Ubiquitous education leads to ubiquitous expertise. Even if you do browser front-end work in a language that compiles to JavaScript, chances are you've still learned enough about JavaScript that you can deal with errors and understand what browser development tools are telling you.

That means that there is a HUGE amount of knowledge floating around out there in the industry, in the open source community, in government, in academia... pretty much everywhere.

You can re-use that expertise when you write server-side logic in Node.

0

It's valuable to be able to share logic across client and server, especially if parts of your application are complex multi-party state machines which can be run in parallel and synchronized between client and server. At the very least it's useful to be able to share declared data structures.

Now, Node JS and Browser JS are slightly different languages, but there's enough of a common subset that you can get a fair amount of work done, especially the logical engine at the core of your application.

0

That's not to say I would, precisely, endorse Node. I think there are better options. Other languages can provide some of these advantages, but not all of them in combination, simply because no language has achieved the ubiquity of JavaScript.

Clojure has a fairly serious effort in ClojureScript. They have a page that nicely compares JavaScript and ClojureScript.

Python has PyJS. I've played with it enough to know that in combination with Twisted, it's possible to share logic between client and server in a manner very similar to Node. I even gave a talk last year which sneakily introduced people to this concept. PyJS is a project which is struggling to re-gain its footing, but I have found that it's worth dealing with its idiosyncrasies just to avoid the rigamarole of comparing two arrays in JavaScript.