DEV Community

Manuka Maduranga
Manuka Maduranga

Posted on

Comparing Frameworks/Languages

Most of the people who say NodeJS is better than PHP has not even used PHP once in their lives. I'm not saying PHP is better, but you need have some amount of experience in both to make that kind of assessment.

Top comments (2)

Collapse
 
lukewestby profile image
Luke Westby

The idea of this kind of comparison as first-class is weird to me. I donโ€™t know how to make sense of it. Whatever you use to build a project is evaluated in the context of how it enabled you to succeed at building that project. How can you compare two tools without the context of what they are helping you to do? Is a hammer better than a sanding belt?

Collapse
 
xngwng profile image
Xing Wang • Edited

I used both.

NodeJS is definitely more modern framework, with it's non-blocking IO, it is much more easier and fluent to do asynchronous programming. For modern backends, asynchronous and non-blocking IO.is very important.

Php feels like an older technology. It is still very popular, but most people starting new projects/startups probably won't use it anymore (Unless you are really good at it, sometimes it is better to start with a tool you already know best rather than a new tool). Also, Php really allows beginners to easily make security mistakes compared to other techs.

Some data here:

moesif.com/blog/engineering/api-an...
Php just have a lot more attack surface than other frameworks.