Why PHP is so much more popular for web-development

Brian Jones bkjones at gmail.com
Wed Jul 25 20:55:28 CEST 2007



Steve Holden wrote:
> walterbyrd wrote:
>   
>> "Once you start down the Dark path, forever will it dominate your
>> desiny. Consume you, it will."
>> - Yoda
>>
>> I'm fairly new to web-development, and I'm trying out different
>> technologies. Some people wonder why PHP is so popular, when the
>> language is flawed in so many ways. To me, it's obvious: it's because
>> it's much easier to get started with PHP, and once somebody gets
>> started with a particular language, that person is likely to stay with
>> that language.
>>
>> Before you can even get started with Python web-development, you have
>> to understand this entire alphabit soup of: CGI, FASTCGI, MOD_PYTHON,
>> FLUP, WSGI, PASTE, etc. For me, configuring fastcgi has been the most
>> difficult part of getting django to work. PHP developers don't have to
>> bother with anything like that. With PHP, you just throw some code in
>> the middle of your html file.
>>     
I'm primarily a sysadmin, and I provide web hosting-like services to a 
community of developers who all want to do their own thing. An obvious, 
clean way to do this has, so far, eluded me. Of course I could shove a 
framework down the throats of my users, but if given the choice between 
picking up a language, or picking up a language, and an accompanying 
framework, which may or may not meet their needs, I think they'd pick 
the former. In fact, in 6 years, we've never had anyone say "boy I wish 
our web servers supported python". They've all been happily using PHP.

I'm in a relatively small shop. But think about an ISP. If you need to 
support thousands of users who all have their own agendas, how exactly 
do you support that with Python? This is not a rhetorical question - I'd 
really like to know :)

In short, I don't think it's the language, but deploying it in a web 
context that makes it less popular. If it were simpler, more ISPs might 
do it, more users would find what they need with Python instead of PHP, 
and it would become a more popular web language, IMHO.

> The latter behavior is typical of programmers. The former is typical of 
> typical users. There are many people producing web sites who I wouldn't 
> let within yards of any of my code. but it's some kind of tribute to PHP 
> that it manages to satisfy so many of them. This doesn't mean that 
> grafting PHP features into Python mindlessly will improve the language.
>   
I don't think anyone is saying the *language* itself needs improving. I 
think there needs to be a cleaner, simpler, more practical way to deploy 
Python as a generic web language instead of being forced to deploy it in 
the context of some other framework. No ISP wants to impose the implied 
limitations on their users, and the users would prefer not to have to 
learn a framework.

Also, I just want to point out that in my discussions with other people 
who consider themselves primarily Python coders, there are plenty of 
them who still turn to PHP for web development. I got into Python for 
systems programming (sysadmin tasks and network programming). If I need 
to do web-based work, I'm likely to still use PHP because I have no idea 
how to deploy/maintain/support Python on the systems end of the 
equation. I'd love to be cured of that notion.

brian.
> The Python approach is a scalpel, which can easily cut your fingers off. 
> The PHP approach is a shovel, which will do for many everyday tasks.
>
> regards
>   Steve
>   

-- 
Brian K. Jones
Python Magazine  http://www.pythonmagazine.com
My Blog          http://m0j0.wordpress.com 
jonesy at pythonmagazine dot com




More information about the Python-list mailing list