Live data from Hacker News

PHP vs Node js... Let's be honest: Node.js couldn't kill PHP. Why?

belitsoft.com

1–10 of 61 posts

Re: PHP vs Node js... Let's be honest: Node.js couldn't kill PHP. Why?

#2
#1 reason the article doesn't mention: It's incredibly cheap to host PHP. Hosting companies push WordPress and other PHP-based hosting heavily and make it super easy for anyone to get a live site going with PHP.

Last time I launched a node app, it took me a full day of messing about in AWS. Last time I launched a PHP app, it took me less than a half hour at Siteground.

Re: PHP vs Node js... Let's be honest: Node.js couldn't kill PHP. Why?

#3

#1 reason the article doesn't mention: It's incredibly cheap to host PHP. Hosting companies push WordPress and other PHP-based hosting heavily and make it super easy for anyone to get a live site going with PHP. Last time I launched a node app, it took me a full day of messing about in AWS. Last time I launched a PHP app, it took me less than a half hour at Siteground.

exactly!

Re: PHP vs Node js... Let's be honest: Node.js couldn't kill PHP. Why?

#4
I have successfully run node.js applications on a hosting account which supported fast cgi for Rails applications.

Unlike normal node.js applications, the process is started and managed by the provider's web server and applications can be uploaded using a standard FTP application.

Here's a similar library: https://www.npmjs.com/package/node-fastcgi

Re: PHP vs Node js... Let's be honest: Node.js couldn't kill PHP. Why?

#5
post #4

I have successfully run node.js applications on a hosting account which supported fast cgi for Rails applications. Unlike normal node.js applications, the process is started and managed by the provider's web server and applications can be uploaded using a standard FTP application. Here's a similar library: https://www.npmjs.com/package/node-fastcgi

Lucky with the provider?

Re: PHP vs Node js... Let's be honest: Node.js couldn't kill PHP. Why?

#6
PHP uses an imperative programming model and has a very clear URL->source file mapping. This means you can look at the URL, find the source file, start at the top and trace your way to the problem.

Node (and Rails, and Java and lots of others) use a declarative router. The app boots. Shit happens. Routes exist. Middleware is involved. There's no way to know what code is implicated in a given URL.

If you're a pro and you can afford to spend a year or so learning framework internals while not getting much done, you develop a sixth sense for where in the codebase an error is likely to be, but you need to spend many weeks and months scratching your head to get there.

PHP is much more beginner friendly in this way.

Re: PHP vs Node js... Let's be honest: Node.js couldn't kill PHP. Why?

#7

PHP uses an imperative programming model and has a very clear URL->source file mapping. This means you can look at the URL, find the source file, start at the top and trace your way to the problem. Node (and Rails, and Java and lots of others) use a declarative router. The app boots. Shit happens. Routes exist. Middleware is involved. There's no way to know what code is implicated in a given URL. If you're a pro and…

A very interesting... observation! I've never heard about it before... Thank you for sharing your professional expertise with us

Re: PHP vs Node js... Let's be honest: Node.js couldn't kill PHP. Why?

#8
I can't take this article seriously when it shows a survey at the top claiming to show a stack overflow developer survey for back-end technologies that lists Javascript at 54% happiness, and then further down it lists nodeJS at 14% happiness. I guess the other 41% were using io.js.

Apparently people are also happier using angular on the back-end. Which makes no sense. Also, pretty sure WP still runs PHP on the back-end. So much inaccuracy here.

Re: PHP vs Node js... Let's be honest: Node.js couldn't kill PHP. Why?

#9

#1 reason the article doesn't mention: It's incredibly cheap to host PHP. Hosting companies push WordPress and other PHP-based hosting heavily and make it super easy for anyone to get a live site going with PHP. Last time I launched a node app, it took me a full day of messing about in AWS. Last time I launched a PHP app, it took me less than a half hour at Siteground.

TBH, PHP is viable for pretty much exactly as long as Wordpress survives and uses it. If that changed, I wouldn't fancy PHPs chances.
Post reply on HN