Why node.js is not as cool as you think it is.

The most common arguments by developers that I consistently hear for node.js is that it is super fast, that iT can run multiple processes independently from one another, that it is event driven and that you can write the frontend code and the backend code in the same language.

Now while these are advantages, this is why I do the majority of my programming in PHP.

  • Node.js is a Javascript framework. I love Javascript and I use it every day, but I do not use node.js unless it is convenient for a specific Task. Why is this? Well, because it takes forever to build anything in node.js which pushes up the costs for the client and ultimately makes them annoyed. It also reduces productivity & creates headaches in the office

  • Node.js applications integrate deeply into the environment through the npm package manager & other, which node.js applications are dependent on for productivity .This means that portability and complexity is significantly increased

  • You don’t need this type of processing power for 99% of web applications. PHP is fast enough and the latest versions that use JIT complication and other performance financing techniques put it in range of node.js in terms of performance. Furthermore, javascript is an interpreted language. It is not a compiled language which means that it is incredibly slow in comparison to a compiled language. If you were dealing with massive traffic and needed huge processing power, you would not use node.js in any event and to make matters even worse for your argument, well, some of the highest trafficked websites in the world use WordPress ( such as forbes ). WordPress drastically reduces performance & the concurrent connections of PHP, yet it still copes with a high load of traffic. So why do we need all that node.js speed for a web application in any event? The answer; well in most cases is that we don’t.

  • Facebook is built on PHP, HHVM and compiled PHP. Facebook is the second most highly trafficked website in the world.

  • Node.js is only about 10 years old and only 2 percent of developers use it for web development compared to almost 79 percent of developers who use PHP. PHP is not a young language which means that the community is huge and it is incredibly easy to find a framework or a code snippet that works for you as most PHP code from PHP 5 onwards still works with the latest versions of PHP. Most PHP legacy code from 15 years ago can still be used today and with minor tweeks, it works beautifully. What is quite interesting is that thanks to WordPress PHP has actually remained steady in terms of market share even though most would like you to believe that it has lost market share to node.js

  • Javascript code is infamously incredibly messy and hard to follow unless well documented by the developers writing the code which makes it difficult for new developers to pick up where the other left off

It is also important to note that while PHP does not support nonblocking io like node js, it uses all of the cores on the server unlike node.js which only uses 1 core , which is why companies such as facebook continue to use PHP instead of node.js as it is more stable with high volumes of traffic then node.js