PHP vs. Node.js: the Battle For Developer Mind Share
snydeq writes: Simplicity vs. closures, speed of coding vs. raw speed — InfoWorld's Peter Wayner takes a look at how PHP and Node.js stack up against each other. "It's a classic Hollywood plot: the battle between two old friends who went separate ways. Often the friction begins when one pal sparks an interest in what had always been the other pal's unspoken domain. In the programming language version of this movie, it's the introduction of Node.js that turns the buddy flick into a grudge match: PHP and JavaScript, two partners who once ruled the Internet together but now duke it out for the mind share of developers."
I actually RTFA and found it to be completely useless.
It's all fine and dandy until you remember we're still stuck in a single thread.
Now cue the apologists.
Node.js is also seeing a lot of use as a tool set provider for other build environments - see Grunt and Gulp, both need Node.js to function. You don't see PHP as that diverse in use.
People stuck on "cheap hosting solutions" don't pay good money to developers to develop software for them. Cheap hosting solutions don't even come close to scaling to anything beyond a blog for a local business.
Unless you've decided to work on a bottom of the barrel open source CMS/Forum system (a market that's pretty much saturated already), the argument that "PHP is the only thing we can run" is just not relevant. Maybe it carried some weight ten years ago but it's a non-issue these days.
my sig's at the bottom of the page.
But seriously, PHP is a dying language. We should let their developers pass.
No no no, you did that wrong!
Kosh: It is a dying language. We should let it pass.
Sheridan: PHP, or Node.js?
Kosh: Yes.
"Python - No way in hell .. the language has to bend to my will, not me bending to its will."
Few languages bend to your will, some learning is always required. I'm not terribly convinced the learning curve for Python is less than for PHP/Javascript given that those two have so many dangerous nuances that it takes years to truly understand them and develop with them without falling victim to their countless pitfalls. If you don't like the syntax of Python that's fine, but it's hardly a compelling technical argument not to use it over PHP and Javascript.
"Java - Antiquated and full of perversions, along with the spectre of Oracle hanging over you."
Java is antiquated? It was first released in 1995. That's the same year that both PHP and Javascript turned up you realise?
As for perversions, what perversions exactly? It's a pure OO language and sticks to that properly. Compared to Javascript that really doesn't know what it is and has functionality that's basically broken like closures because it tried to do away with explicit pass by value and pass by reference meaning you need to do horrible hacks to force creation of a new scope if you want to pass by value into a closure rather than have a variable captured.
PHP? It's about as perverted as you can get. It started out basically like C for the web, but without the difficult stuff. Then it did exactly like C++ and tried to glue OO on top, only C++ kinda worked because it was done by a competent computer scientist whilst PHP had it's OO tacked on by a mob of wannabes.
Out of the 3, Java is no older, and is the only one that actually determined and stuck with a consistent and planned design philosophy. Your criticism therefore seems to be wholly nonsensical in the context of comparison against Javascript and PHP. The very fact that Javascript was rushed out with a similar name in the same year as Java to cash in on it's hype should at least tell you something about the quality of Javascript as a language if nothing else.
"C/C++ - I know it is done, but would you?"
It really depends what you're doing and how competent you are.
"C#/VBV.Net - Even with MS opening up things .. "It's a trap" /Ackbar"
If it's a trap then it's a pretty poor one because they keep on open sourcing more and more of it. First they go and make the language a real actual standard, and then they start open sourcing the framework whilst giving Mono their explicit blessing.
Microsoft now isn't Microsoft the 90s, it has realised that it needs C# to be runnable in as many places as possible like Java, hence why they opened up the core and plan to open up more and more of it. Nadella knows they lost the smartphone war, and he knows that Windows Server hasn't taken over the server world. He knows that the only way to get a foothold in these areas is to at least take what it does well there - development tools and technologies. The newest version of Visual Studio even supports Android development.
You seem to have pulled together a list of pretty weak criticisms of each language and pretended that's justification not to use them over PHP and Javascript despite PHP and Javascript both having glaring deficiencies that make the negative considerations you pass off as fact above wholly irrelevant in the grand scheme of things.
Each technology has it's merits, but saying I'm going to use a technology with 100 deficiencies because the alternative has 1 deficiency seems to me to be a bit short sighted (no zealots, please don't take the 100 to 1 literally, it's intentional hyperbole to make a point).
At the end of the day we're stuck with Javascript on the client for the foreseeable future and that doesn't bother me too much. But why use it or PHP on the server when there genuinely are just all around better alternatives for that particular case?
I don't even buy the Javascript on the server because you can share code with the client thing either - your server objects automat