Why are Web Developers Choosing Node.js over PHP?
There is an interesting phenomenon happening that I want to talk about. PHP is gradually being looked down upon.
I remember seeing an interesting report once on the battle amongst the web browsers for the position of the leader. The report roughly talked about several browsers striving to win the throne. In history, things evolve by slowly no longer being enterprising and then being gradually surpassed. Looking further afield, the history of the famous party in Zimbabwean is also roughly similar. Will it be the same with PHP? Will MDC be able to replace it? There are many opinions.
“PHP is the best language!”
The above statement was once very popular.
PHP was once the most popular language in the web development field because of its many advantages, such as it being open-source and free, its simple syntax, and strong scalability. Slack, Yahoo, and other large apps have also used PHP as their development language.
But everything has two sides. The shortcomings of PHP are also obvious: low code reuse rate, not good at recursion, not good enough for multi-threading support, lack of standard framework and coding standards.

In recent years, the popularity of PHP has been declining. In sharp contrast, the popularity of the rising star Node.js has been soaring. More and more developers have invested in Node.js and abandoned PHP.
In the Medium article “Why I Abandoned PHP for Node.js”, Shawn Grover explained 6 reasons why he gave up PHP and chose Node.js:
- Node.js can reduce the complexity of the development environment;
- Node.js uses a unified language in front-end and back-end development;
- Node.js only requires installation on the server;
- Node.js better reflects the separation of concerns and lower coupling;
- Node.js uses Apache/Nginx proxy;
- Node.js makes it easier to find a suitable package;
In the next five to ten years, Node.js will not become obsolete.
Node.js keeps the standard GIT workflow and is suitable for most code editors.
Behind the many differences between PHP and Node.js, the core point is the separation of concerns.
If a problem can be broken down into independent and smaller problems, it is relatively easy to solve.
If the separation of concerns is not done enough, there will be too many points that need to be paid attention to, and the programmer’s ability is limited and they cannot focus on all aspects of the problem at the same time. Therefore, Node.js can better meet the needs of programmers during development.
Of course, the above is just an opinion. If you have ideas, you might as well share them and communicate.
More content at plainenglish.io