PHP vs. Node & Why It Doesn’t Matter
March 24, 2015
I came across an article titled, “PHP vs. Node.js: An epic battle for developer mind share” and it made me scratch my head. I like that people are talking about developer mind share, because it can really impact the quality of tools and end results from a given platform. But posts like “this tool is better than that” don’t help developers choose the right tools for the right job, or help clients understand the big picture.
The Mainframe is Dead
]Back in the bad old days of computing, computers were so expensive that it made sense to have one really big computer with many “dumb” terminals. The big computer, the mainframe, did almost all the work. When personal computers and the Internet took off, it shook that model to the core; PHP was part of that vanguard. Suddenly, users were sitting at powerful workstations instead of dumb terminals, and the role of the mainframe became one of dishing out content (called HTML) instead of the entire application. The web browser was the application, and PHP was a great tool to deliver content to it.
Why it Doesn’t Matter
In short: every language sucks. Except when it’s used for its intended purpose. Comparing tools designed to do different jobs doesn’t help anyone – and Node.js isn’t designed to shuttle HTML content from the server to the web browser. It can, quite well in fact. But that’s not what it’s good for. Node was written to be a lightweight network services tool. It was conceived for fast processing of discrete network messages. However, it gets lumped in with web development technologies because that’s basically what a web server does. It’s just that Node is so much more than a web server.
Node can serve up HTML, or it can serve up data, or provide an API for managing a network or data center. It can scrape websites or process files… it’s a nice tool for doing behind-the scenes work. All that is to say: it’s not a direct competitor to PHP.
And that’s completely ok – for both languages.
Stay up to date with our email updates!