0
PHP or Node.js
For server-side programming, which one is the best?
4 Antworten
+ 1
php is designed for server side programming while node js is designed for using javascript in server side which is at core a front-end language.
Node js is a little bit faster than php but both have structural issues for enterprise applications because they both can't really implement a true and well designed Architecture that's were frameworks came in to play,
for php 'symfony' is a great framework for creating a well designed applications
and for Node js , 'nest' is a new framework that does the same for node
both can be a good option for a small web application but in a large scale there are indeed better options such as Java , C# , Golang and etc
node works better for building and developing API's
while php works better for building traditional web pages.
+ 1
Okay, thanks for your answer. Basically, it all depends about scale of web development. If I start build a new website the option is PHP or Node.js and when my website is getting bigger, the option is Java or C#. But, Isn't the giant company like Facebook or Twitter using PHP and Node.js? Why they are not using Java or C# instead?
+ 1
So, there is a secret company that doesn't anyone else know what they are using in company. Okay, I never think about it. Thanks for the explanation.
0
facebook is not just using the php , they created a complier for php so it runs really faster which is called Hack or Hacklang , and the reason that they start building their website using php is that at that time (2000s) php was the best option but not anymore
and node js is usually used for microservices in large scale apps like twitter
which means they don't only use node js , they use node js alongside other techs
google no longer use node js for microservices for their youtube backend server they replaced it with Golang
you can absolutely use node js or php for a large scale app if your app has a perfect architecture , but why use node or php when there are better options?.