I came across a post today bemoaning the state of python web development. Yes Python is a "better" language so why does PHP win in the web space?
This is an interesting questions as I contemplate how much easier it is to run WordPress than
dasBlog. I'm currently using
dasBlog for hosting the blog but at the present time I can't update it because the updater project from SourceForge won't compile and I honestly don't have enough time to mess with it.
At the same time with my Wordpress blogs, I simply use the appropriate svn commands and then go to the upgrade.php page and I'm magically updated to the newest version.
But Doesn't PHP Suck?
I've been asking myself that question for awhile now. The more I consider it though, the more I consider the beauty of PHP suckiness. PHP just works. There's something to be said for that.
In fact, I'm thinking about creating my new web site in PHP even though I'm an ASP.NET developer by trade. Why would I do that? A few reasons but mainly, worse is better.
My php sites just always work. The hosting and "framework" for php are so realiable I never have to worry about them. On the other hand my virtual server hosting for windows/asp.net/iis is always crashing.
This isn't to say that Windows hosting is unreliable, in fact at work our servers run for months/years at a time with no problems. However, a php plan is 6.99 a month where a windows plan is 5 times that.
Python Just Isn't a Good Web Language
Why? Whitespace. PHP just blends end with the tags of an html page. The same could be said of JavaScript and C#. C family code can survive the hostile web environment and the inevitable munging of scripts as they are combined to form whole pages.
It's survival of the fittest not survival of the most technically pure. Our DNA holds all kinds of junk like retrovirus dna and all kinds of crazy antiquated things like the code for our appendix.
However, through it all, DNA keeps on trucking.
PHP is Good Enough
Just like C is good enough, php is good enough for your web development needs. Once you combine cheap with easy and good enough you have a market winner.
It's kind of depressing at first. I'm an ASP.NET guy and I love the new features in C#. However, there is the whole economics and ease of use factor.
For instance, building my new online store for my software apps. If I use asp.net, I'm much less confident that my website will stay up and running. With PHP I'm more confident because my own experience has taught me that php/linux is almost bulletproof (and dirt cheap).
I really feel for all those python programmers looking for truth and beauty in web site coding. I know Python can be used as a server side scripting language, but I don't think it's ever going to be as easy to use as PHP. If this were 1997 there might have been a chance, but the world has moved on.
Python is awesome for admin scripting and processing. However, I just don't think it can beat PHP in the web arena, no matter how much "better" it is.