python vs php for web programming

Andrew Barilla andrew at exit66.com
Thu Dec 11 13:36:11 EST 2003


mir4uu at yahoo.com (mir nazim) wrote in message news:<425cc8d1.0312110636.56be9ecf at posting.google.com>...
> i m currently using PHP with Apache (a.k.a 'mod_php') for my web
> development work. i came to know that python can also be used to do
> web programming using 'mod_python' for Apache. i wanted to know the
> difference between th two 'mod_php' and 'mod_python' in terms of:
> 
> 1. speed of execution.
> 2. productivity 
> 3. maintainance
> (i know python is most productive and maintainable language in the
> world, but is it same for web programming with Apache).
> 4. availability of features e.g, cookies and session hadling,
> databases, protocols, etc.
> 
> I also wanted to know about Zope and comparison of its proformance,
> features, etc. with Apache.

I think mod_python is more comparable to mod_perl from what I've seen
in terms of how you interact with the webserver.

Instead of mod_python though, I'm doing my web programming with
Webware (http://webware.sourceforge.net/), SQLObject
(http://www.sqlobject.org/) and FormKit
(http://dalchemy.com/python/formkit/).  Compared to php I can code in
about 1/4 of the time.  And I've actually been programming longer in
php than I have been in python.  This combination is extremely
powerful and most importantly I can take advantage of existing python
code I have from a desktop application.

Both mod_python and webware have cookies and session handling. 
Database access is through any available Python library such as
mysqldb (http://sourceforge.net/projects/mysql-python).  Not sure what
protocols you're looking for but since you can use any python code
that's out there, I'm sure you'll find everything you'll need.

I played around with Zope until I tried to utilize Python code that
I've already written and then moved on.




More information about the Python-list mailing list