Slashdot Mirror


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."

8 of 245 comments (clear)

  1. Jesus Christ by Anonymous Coward · · Score: 5, Funny

    This would be the worst movie ever.

  2. okay by Anonymous Coward · · Score: 5, Insightful

    I actually RTFA and found it to be completely useless.

    1. Re:okay by TheRaven64 · · Score: 5, Funny
      You should improve your reading comprehension. TFS says, right in the first line (before the link):

      InfoWorld

      If you still click on the link after that, then you only have yourself to blame. I bet you click on goatse links too.

      --
      I am TheRaven on Soylent News
  3. Re:Before reading TFA ... by Noughmad · · Score: 5, Funny

    But so does PHP. In this battle, whoever wins, we lose.

    --
    PlusFive Slashdot reader for Android. Can post comments.
  4. Not the same use cases by Rhaban · · Score: 5, Informative

    These two languages each have their own use, and to chose between them you should not ask which is better but which is closer to my use case.

    PHP, for all its problems, is still a very useful language for developing web sites, if only for the quantity of tools (frameworks, cmss, etc) available and their quality (far from every php tool is good, but you can easily fond a quality tool for each category: symfony 2 is a very good oo framework, drupal and ez publish are good cms...).

    Node is younger, and does not have such a toolset. Sailsjs is a good framework but far from mature.
    But it does what php can’t: a nodejs application is its own server and runs continuously, instead of being a set of scripts that must reload everything with each request.
    It makes it a very good language for real-time uses, like the back-end of a small multiplayer game.

    1. Re:Not the same use cases by Rhaban · · Score: 5, Funny

      A big steaming pile of crap is still a big steaming pile of crap, no matter how large the pile.

      When you want your corn field to produce corn, nothing's better thant a big steaming pile of crap.

  5. Dumbest article on the subject. Ever. by Qbertino · · Score: 5, Interesting

    TFA is a bunch of blabbering from someone who has no idea what he's talking about - void of anything useful.

    To get this out of the way:
    Node.js is a serious contender to topple PHP off the server-side, for the simple fact that we would then have one PL less in the entire webstack, which is way to
    complex anyway.

    I myself have been pondering trying out Node for larger non-trivial projects. I'd be the first to switch if it were possible.
    I haven't yet - Node is just not quite ready for prime-time.
    Why?

    1.) The tools don't exist yet and Node seems to gather the same problems Rails has: A bloated, instable and unreliable mumbo-jumbo of countless libs, tools and extensions - various package managers included, each built on a whim and powered by a neat logo and a 6-week fad that sweeps the community and adds to the mess already there. In short: The Rails problem of to much navel-gazing and not enough of solving real world problems.

    2.) Callback hell.
    In fact, its Node/JavaScripts callback hell that made me realise a thing that is so great about PHP: What you see is what has been made, for you, for that specific request. LAMP is such a bizar solution no one in his right mind would suspect it could work, yet most site on the internet run on it. The stack is so vertical it actually makes any Java solution look like an ADHD driven Visual Basic School projekt in comparsion. And I mean vertical right down to the way it actually works!

    Try building anything like Joomla or Wordpress with other solutions such as JS and you'll end up with problems that completely leave the domain of your work. The simple fact that a PHP request is dead and gone when its finished sending its request reply and all the rest it offers is custom built around any strange problem the

    Any concern you have right at the moment when developing for ther server side web PHP has neatly covered ... ok, forget I said neatly, ... but covered and everything else is put aside. PHP is born out of a template engine, and as bizar as it sounds, that's its advantage. Any problem the Web domain can come up with puts PHP in a very strong position. Serverside things PHP just shrugs of with some strange custom internal function has JS and Ruby tripping and falling flat on their face with no chance for rescue.

    3.) PHP is 10 years ahead of the game. No joke.
    Try finding a product like Typo3 or Wordpress in Java, Node, Rails or any other backend runtime you fancy. Won't happen. It take me 5 minutes to download Typo3, 2 hours to set up - mostly because configging Apache and setting up T3 is an arcane science unto itself - but then it's there. Everything I would ever want for a web product.
    Joomla, Drupal, Wordpress and co. are even way easyer. The only other contender holding up is Pythons Zope/Plone. All else is a decade behind at least. Rails included.

    Bottom line:
    As soon as Node gets their shit sorted out and offers a serious upside vis-a-vis LAMP, PHP is going to continue to rule. It gets the job done. Node and Rails don't. End of Story.

    --
    We suffer more in our imagination than in reality. - Seneca
  6. Re:Before reading TFA ... by sanosuke001 · · Score: 5, Informative

    Any dynamically typed language that isn't just used for scripting (your perl is probably okay) should be taken out to pasture and shot. JavaScript used to be okay; then application development came and it should go die in a fire.

    --
    -SaNo