python vs php for web programming

Discussion in 'Python' started by mir nazim, Dec 11, 2003.

  1. mir nazim

    mir nazim Guest

    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.
    mir nazim, Dec 11, 2003
    #1
    1. Advertising

  2. (mir nazim) wrote in message news:<>...
    > 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.
    Andrew Barilla, Dec 11, 2003
    #2
    1. Advertising

  3. mir nazim

    Guest

    (mir nazim) wrote in message news:<>...
    > 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 can't really give you "the answer" if there is one, but here are
    some resources I've found helpful:

    http://colorstudy.com/docs/shootout.html
    http://www.python.org/cgi-bin/moinmoin/WebProgramming

    If you want something similar to PHP, see Spyce. If you want to do
    most of your coding in pure python, see Quixote or the cgi module. If
    you want to use templates (like PHP with Smarty), then see Cheetah,
    Albatross, etc. There are dozens of options now, but no one real
    front runner popularity-wise (except maybe Cheetah for templates).

    Realize though most web hosts out there though don't provide modpython
    (or java for that matter), so try it out on your own computer first or
    go with a python-friendly web host (some are also listed at the wiki).
    , Dec 11, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Antony Lesuisse
    Replies:
    0
    Views:
    529
    Antony Lesuisse
    Dec 10, 2004
  2. Nikola Skoric

    python web programming for PHP programmers

    Nikola Skoric, Dec 24, 2008, in forum: Python
    Replies:
    3
    Views:
    857
    D'Arcy J.M. Cain
    Dec 24, 2008
  3. raviraj joshi
    Replies:
    0
    Views:
    302
    raviraj joshi
    Jul 4, 2009
  4. reshma shinde
    Replies:
    0
    Views:
    385
    reshma shinde
    Jul 4, 2009
  5. Rajive Narain
    Replies:
    0
    Views:
    1,574
    Rajive Narain
    Sep 18, 2009
Loading...

Share This Page