Node.js is Perfectly Fine And Probably You Don't Need it
In my friend’s case, I don’t advise him to rewrite his app in any other languages. He has been writing PHP for years and are quite proficient. He always feels like picking up something new. I think learning new stuff is great - just don’t do it by rewriting your existing app, which has complicated logic and of course, spaghetti code. Rewriting any existing code in some language you are not familiar with is almost guaranteed to fail. If you aim to make your existing codebase better, refactoring it is more practical.
I used to write an app in PHP (actually I was forced to, for various reasons). When I finally was able to get out of it, I felt that I could not bear with PHP any more and decided to rewrite it in Python, a language which I had a decent experience with. After a week of rewriting some of the component, I found out that it would take more than a month to rewrite the whole application and I could add a lot of new features in this month without rewriting, which was more important. And during that week, I found out that most of the code that I considered ugly, were actually because of the way it was written, not the language. Of course, PHP is an ugly language with bad design. But simply translating the ugly code to any other languages does not solve the problem. In fact, I sorted out the logic, organised in a cleaner way and eliminated the usage of the bad language features (which PHP has a lot), I ended up with an much cleaner codebase.
Node.js is fine, it has its merit and it serves its niche market well. So when you start a new real time web app with not-so-complicated logic, try it. If you are developing an online game, you might want to deal with concurrency more seriously - coroutines might suit you better. If you start a content-centric or CRUD web app, you don’t need Node.js. If you write it with Rails or Django, you can develop much faster and you don’t need to deal with callbacks mess on top of your logic. The thing is, for these apps, you don’t have lots of concurrent requests. And for a single request, most of the time is spent on network transfer and perhaps database query - Node.js does not solve the essential problem here. So instead of squeezing a few milliseconds out of perhaps a hundred, you are way better off getting a SSD or a better bandwidth.
So only use Node.js when you actually need it. Don’t just use it because it is cool / it is popular/ I heard it’s fast / I want to learn something new. And by the way, the best place to try something new is on your weekend project, not on your existing project that runs perfectly fine.
Discuss on HN.