473,419 Members | 1,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

python vs php for web programming

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.
Jul 18 '05 #1
2 8861
mi****@yahoo.com (mir nazim) wrote in message news:<42**************************@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.
Jul 18 '05 #2
mi****@yahoo.com (mir nazim) wrote in message news:<42**************************@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 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).
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: asdf sdf | last post by:
i'm interested in using python for win32 COM automation and sysadmin scripts. many recommendations for Mark Hammond's Python Programming on Win32. but it was published four and half years ago....
2
by: dm | last post by:
Hi: I want to program using VB mixed python. who have any experience? and hwo to do ? thanks dm
4
by: Mark | last post by:
Hello. I am new to programming and Python and was wondering if someone could help get me started. I picked Python to start learning to prgram because of some things I have read about it (easy to...
0
by: Ram Ravi | last post by:
I would like to get the SourceCode for Rick Hightower book "Python programming with Java Classes" (jython book). I went to rickhightower.com and got Connection refused message. Does somebody...
13
by: Brian Quinlan | last post by:
I've decided that it would be be fun to host a weekly Python programming contest. The focus will be on algorithms that require a bit of thought to design but not much code to implement. I'm...
0
by: Tin | last post by:
Hi, I have listed Python Programming Patterns ISBN:0130409561 on ebay.co.uk A brand new with really cheap price-4.99 If you are interested, go and have a look at www.ebay.co.uk and locate...
23
by: herraotic | last post by:
I have been getting ready to learn programming for a long time, installed a GNU/Linux operating system, learnt the ins and outs but I think it is time to pick up a book and learn to now program. ...
0
by: gbadamosi | last post by:
What tools can I use for embedded python programming: 1) Download Tool, and 2) Debug Tool. I am interested in Windows based tools.
11
by: John Coleman | last post by:
Greetings, My copy of the second edition of Chun's "Core Python Programming" just arrived from Amazon on Friday. What really jumped out at me is an interesting feature about how it sequences its...
2
by: Ali seaman | last post by:
Hi all, I have a question on how to Create a graphical user interface with Python programming language and integrate it with CATIA V5-API ?( I am working in the Field of Mechanical engineering...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.