Can Java be compared to NodeJS?
TL;DR : NO!
Background: A discussion on the Tikal mailing list started by comparing search trends of Ruby and NodeJS and soon evolved to a comparison of Java and NodeJS...
First off - I must say I have quite a lot of experience with Java and am a pretty big fan of NodeJS.
And now to the point: None in their right mind should event try to compare Java and Node. All the clichés about Apples and oranges apply here. The discussion whether or not Node can do anything Java can do but better or the other way round is not relevant. The fact is that in many cases Node can get the job done with much less effort at a much lower costs. This reminds me of what I felt as a young cocky Java developer whenever PHP was mentioned. Sure you can build an e-commerce site with PHP in 3 months with a budget of $20K but it will SUCK - while if you build it with Java it will take 6 months and a budget of $200K and it will be great.... Guess what most the e-commerce systems run with... actually seems like most of the websites out there run with this inferior wannabe scripting language - http://w3techs.com/technologies/details/pl-php/all/all
Over time I learned some hard truths:
- Not every project needs to be a military grade fortress
- Not every piece of code will evolve - not everything requires abstraction
- PHP still sucks but in many cases it gets the job done fast and cheap
There is much more to software development than the actual software - budget and time-to-market often are more important than stability, scalability, security, and maintainability. There are also issues of recruiting, and educating new engineers.
The bottom line is that many medium to small to very small projects can benefit from Node's ease, speed, and fun(!) of development. I wonder where Mark Zuckerberg would be now if he had chosen to go with Java and had taken the time to set up a Model layer with ORM and an abstract service layer and abstract Data layer and Spring security and Hibernate and MVC and mod_jk and JSF and you get the picture...
We've all seen a lot of java projects that were engineering masterpieces but failed horribly and crappy projects that succeeded beyond any wildest dream.
So what to choose for your next project? - It doesn't really matter as long as you don't use for