|
> What would be fascinating would be an attempt to understand why PHP remains so dominant despite the well-known flaws. I've actually put a fair amount of thought into this. I've arrived at the conclusion that it's because it ships with the Big Three parts of any web app in a single package: Request/response handler, scripting engine, and template engine. To the novice, there is no distance between the query string in the URL and the parameters available in $_GET and the ability to write those parameters back to the page via <?php echo ?>. They're all wrapped up in a handy mod_php binary that runs in Apache, and you probably don't even have to do any extra work to get it to run. It Just Works. This has nothing to do with PHP as a language, but it has everything to do with PHP as a web-oriented product. PHP isn't for systems administration, or generalized scripting, or embedding in your game to serve as its scripting engine. It assumes it's web-facing, and that removes a lot of the friction that otherwise trips people up. What this means is that it's trivial to deploy full-blown applications like Wordpress, phpBB, Joomla, Drupal, and a host of others. They are literally as simple as "unzip this file and go to http://yoursite.com/package. That's huge! As a Ruby web developer, I'm envious of that. I wish I could give people a zip, say "drop this here and unpack it and you're up and running". PHP is the lowest-user-overhead "make things happen on webpages" language in use right now. This comes with all kinds of downsides which many of us are familiar with here, but PHP's success has nothing to do with the language itself, and everything to do with how easy it is to deploy a full PHP stack itself, and then any PHP application on top of that. |
To me this signifies a significant hole in the market that competing products could fill. We've already seen that, to some degree, with platforms like AppEngine, but not so much with self-hosted solutions. Or do such things exist? If so, why are they not more prominent?
Another huge bonus for PHP is that a AMP stack is easy to run on Windows, Mac or Nix. The same cannot be said for Rails or Python.