• Register
100 points

Both PHP  and Node.js are good, but there are some differences too which you should need to check:

  • PHP is great, especially with the latest releases, it offers great performance and a lot of improvements, but still, Node.js shows better performance thanks to the async approach


  • The well-known advantage of using JavaScript for the back end and front end also gives us a lot more flexibility in the development team — this means that more developers can contribute to both the front and back end and collaborate more on different components of the product we will be building


  • NestJS enforces good DDD architecture and separation of concerns, so one can invite an Angular Front-End developer to work on the back end and he/she would manage with ease


  • Node.js is better when it comes to building a JSON API — it is not messing up with HTML (separation of concerns), while with PHP you may have the temptation to serve HTML right from the monolith


  • Node.js and especially the NestJS communities feel more conversant. In the PHP world, it takes more time to filter out the noise, there is a lot of information for every potential problem you have in PHP, but most of the solutions are far from the best


  • With the rapidly growing ecosystem around JavaScript, which has its pros and cons, comes NestJS which gives the promise of LTS and relies on proven architecture and principles


  • A lot of popular programming languages like Python, Java, C and Ruby can be compiled to JavaScript 


  • npm/yarn have a large pool of dependencies and they require more wise picking and double-checking when it comes to installing yet another dependency in the project. Personally, I don’t think the composer world is much different. you always have to think twice and verify when you invite someone else to contribute to the code inside a project


  • TypeScript is way better than PHP’s native types of “warning” support. Of course, it comes with a learning curve for people who have never used a strongly typed language and it has drawbacks when you want to use some npm dependency that doesn’t have TypeScript support, but the truth is that almost all of the popular packages already have it
100 points