Do you think Node.js is overrated?

Poll Options

339 votes

Closed · Final Results

16Responses

Write your response…

This answer has received 1 appreciation.

Yes and No - let me explain

No, use the right tool for the job at hand. NodeJS is certainly better at quickly getting stuff out and just about anyone can write JavaScript, so your development cost will be lower in the short term. To be a Java developer, you need many years of experience, experience which is getting more and more difficult to get unless you spend a lot of time on your own studying Java and getting the certifications - I don't know any companies hiring junior Java developers, so on the job experience is almost becoming non existent.

For long-term maintainability, portability, Java / .NET is certainly a better option.

Will NodeJS code you've just written or libraries you've just imported still run in 5 years time if you update your Node version in 5 years? Probably not. Java? It's been doing that forever keeping older versions forward compatible for 15 years+;

Do you care about whether your code will still run in 5 years time when you just have enough money left for 6 months to get a product out? Probably not. If you are a large enterprise company who've just spent 20 million dollars getting a piece of software developed, do you care if the software still runs in 5 years and can still be worked on in 5 years? I bet you they do.

It's also easier writing bad code in JavaScript than it is to write bad code in Java. The compiler in Java almost babysits you through the process making sure that you don't do stupid things. If I write a line of code like this while(1 == 1){ dosomething(); }, the compiler will tell me that the code below the while statement is unreachable and that the while will never terminate. If I write Integer a = null;, then do System.out.println(a.toString());, the compiler will warn me that a is null and will throw a null pointer exception. If I'm using anonymous functions in Java8, the IDE will tell me I can write the code better using Lambda expressions.

Yes, there's a lot of marketing hype around NodeJS, but that's not NodeJS' fault. That's more the media that's to blame. I've seen this kind of hype for just about every new language that becomes usable, from Microsoft C++ to Borland C++ to Borland Delphi to C#.NET to Java when it initially went big to CSS when it first came to the browser (articles like To CSS or Not To CSS is the Question were common and everywhere) to Dart (massive media campaigns claiming Dart will replace JavaScript) to Ruby and even Python when it replaced perl as the goto language ... you name it, the media needs something to write about, so they'll usually hype whatever new language / technology is available so they can stay relevant.

Is it overrated? No, as I said, use the right tool for the job. Does the media make a lot of noise about it, Yes, they do.

Wish I had as much free time as you. see NG (Next Generation), second paragraph github.com/nodejs/node/blob/master/ROADMAP.md

Write a reply...

Instead of talking theory, I'll just give my story.

I originally built Sleeperbot.com in 2009, a realtime fantasy football forum in node.js and it was great for the first few thousand users, about ~100-300 concurrent at anytime.

However a lot of things bothered me, like error handling, lack of solid libraries (major bugs in socket.io and zmq), which made me switch to Python for productivity & stability reasons.

The app scaled really well in Python for a bit, I was able to address most bugs in Python pretty easily compared to node.js. However the users grew to 20x, and I experienced scaling issues with many thousands of connected clients all trying to get in with 10 seconds of each other when we send a global Push Notifications. Both Node.js and Python would have this same problem, being as they are single threaded, so you'd have to write your own distributed fault-tolerant system which is not exactly simple.

This ultimately led me to Erlang. The syntax for Erlang was ugly, but I didn't care. I just cared that my product was stable in production and can handle 20,000 concurrent users all connecting to a machine within a 10 second window and passing messages back and forth in real-time. I needed something that could work just as well for 100,000 users which I expect next year. I also cared that it doesn't crash and that it's self-healing.

The thing I learned is this. If you care about productivity, sure, by all means, node.js. If you care about production and stability, go with something proven, like Erlang.

I've settled on Elixir over Erlang because it has better syntax and compiles to bytecode that runs on the Erlang VM. It also has more momentum than Erlang right now. The cons are that you will experience productivity loss when you switch from OO to Functional style of programming in the very beginning. Elixir / Erlang being less used languages are also missing some libraries that Python and Ruby have that make things dead simple, so I have to be a bit of a polyglot in the meantime.

I still use node.js for mostly brunch.io tasks, but that's about it.

Write a reply...

npm, npm, npm. npm is unrivalled as a package manager.

NPM is pretty decent, I'd say Dart is right next to it at the #1 spot although not as mature yet.

Write a reply...

Absolutely not. It's a joy to rely on a single language for the whole stack.

Write a reply...

Yes, the hype machine got into full gear a few years ago and tried to say Node was the answer to everything. But that happens with every technology that gets big. Node does solve a certain class of problems, namely streaming blocking IO, very very well. Things that would have taken hundreds of lines of C code can be turned into 10 lines of Node. For a certain class of problems is really is a silver bullet. Just don't try to shoot things that aren't blocking io werewolves.

Write a reply...

Load more responses

Join a friendly and inclusive Q&A network for coders

  • 🖥Pick the technologies you like & read great content through your feed.
  • 💬Ask a question when you want to learn more about anything.
  • 🚀Share what you know & build your portfolio.
Sign up nowLearn more

loading ...