Peter Wayner wrote on InfoWorld an article titled “PHP vs. Node.js: An epic battle for developer mind share“, sharing developers opinions on who’s better PHP vs NodeJs ? First question that come to our mind is why comparing PHP and not any other programming language, most probably because they both have the same purpose or target the same developers if we can say.
This have been said, the choice of the programming language is a decision which should consider not only the performance of the languages, but also the availability of the developers, salary range, allocated budget … etc.
The table below resumes PHP and NodeJs wins as explained in the article :
|PHP Wins||NodeJs Wins|
|Mixing code with content||Separating concerns|
|Deep code base||Newer code means more modern features|
|Simplicity (sort of)||Complexity of closures and more|
|No client app needed||Service calls are thinner than HTML-fat PHP calls|
|Speed of coding||Raw speed|