Python vs PHP

Harry George harry.g.george at boeing.com
Thu Jul 10 14:00:53 EDT 2003


Paul Rubin <http://phr.cx@NOSPAM.invalid> writes:

> Max M <maxm at mxm.dk> writes:
> > Ahem ... How os Python web development fragmented? Most of it probably
> > takes place in the Zope world.
> 
> Nonsense, look at all the Python web platforms there are that don't use Zope.
> 
> > But mod_python is an official Apache module. Wich sets it about on par
> > with PHP.
> 
> Nonsense, it's not on a par with PHP.  It doesn't include any template
> system, any sessions, etc.
> 
> 
> > It has a standard library that beats the socks of PHP's builtin functions.
> 
> Nonsense, it doesn't include any SQL database interfaces and you're
> left on your own to find one, install it, and get it working.
> 
> > On top on this there are severeal modules for templating etc. PHP does
> > not have these modules, so everybody has to do it in PHP's own faulty
> > way.
> 
> Nonsense, you're trying to spin a deficiency as an advantage.  PHP is
> its own template system, for better or worse.  Python doesn't include
> any template system and you're left on your own to find or write one,
> install it, and get it working.
> 
> > Python is not fragmented, but there are more high level modules for
> > doing things.
> 
> Nonsense, of course Python (for web development) is fragemented, look
> at all these different Python web modules we've been discussing.
> Python does have a lot of modules (like Numeric) that PHP doesn't, but
> they're not that useful for web programming.  PHP is narrowly focused
> on web programming and is far superior to Python for that purpose
> unless you spend a lot of time enhancing Python with add-ons before
> you even start writing your applications.
> 
> > There are more PHP developers, that's right, but they are all starting
> > from scratch, with a poor language. So it's their loss.
> 
> Nonsense, Python is a better language than PHP, but that's the only
> advantage Python has for web development.  The language is a small
> part of the overall system.  And it's Python developers who must start
> from scratch, not PHP developers.  Python could catch up by adding
> more stuff to the standard library, but it hasn't done that yet and
> most of the suitable Python modules for PHP-like usage aren't really
> ready for prime time.

This may be a case of "web application" meaning different things to
different people.  Ours are architected as Model-View-Controller, with
the Model being a fairly sophisticated knowledge-based engineering app
(this lots of those add-ons you mentioned).  We wrap that with
web-aware View and Controller code (which imports the Model) for
headers/footers, transaction state memory mgmt, exception handling,
etc.  We sometimes do dynamic selection of which "imports" to do,
based on user-supplied data, or data from uploaded files.  

In this context, the webification aspects are pretty simple -- we give
developers a framework and they fill in their particular View and
Controller functions.  The intellectual energy is in the Model, where
PHP isn't going to help.


-- 
harry.g.george at boeing.com
6-6M31 Knowledge Management
Phone: (425) 294-8757




More information about the Python-list mailing list