Python as replacement for PHP?
SimonW
drconrad at metaplay.com.au
Sat Feb 28 10:24:09 EST 2004
Bruno Desthuilliers wrote:
> Bart Nessux wrote:
>
>> Erik Johnson wrote:
>>
>>> This is somewhat a NEWBIE question...
>>>
>>> My company maintains a small RDBS driven website. We currently
>>> generate
>>> HTML using PHP. I've hacked a bit in Python, and generally think it
>>> is a
>>> rather cool language. I've done Perl and like it, there are a few
>>> features
>>> of PHP I like but overall am not too excited about it.
>>
I've found that the server pages paradigm, used by PHP and ASP, to be
rather limiting when it comes to larger scale web applications. The
paradigm also lends itself to creating spaghetti code (and sites).
Python on the other hand, is quite capable of creating systems not bound
by the convential server page paradigm. It also has powerful facilities
for managing modules, classes and namespaces, which PHP lacks. These
things help out tremendously when it comes to maintenance. Unless PHP
has changed drastically in the last year or so, I believe these
assertions to still be correct.
>>
>> When it comes to dynamic, DB driven sites, PHP is the only way to go.
>> Python is not even close to being suited for this task.
>
I've been programming PHP for much longer than I have been using Python.
After cleansing my mind of the server pages style architecture forced
upon me by PHP, I re-found the fun I used to experience in web
programming. Python is perfect for the job. I've found mod-python a bit
of a chore, so I used twisted web for a while. I've now written my own
server, specifically for handling a REST style architecture. It took me
4 hours to write. It handles gzip encoding and basic authentication.
This is not a testament to my ability, but to the fluidity and power of
Python.
>> A serious business decision? PHP would be the only winner here. You
>> should not even be considering another language for this, it borders
>> on stupidity.
>
You provide no qualification for this statement. Your admonition to
"not even" consider other languages than PHP is bad advice, and springs
from your own stupidity and/or ignorance.
Regards,
Simon Wittber.
More information about the Python-list
mailing list