Need a compelling argument to use Django instead of Rails

Bruno Desthuilliers onurb at xiludom.gro
Mon Jul 31 13:37:26 EDT 2006


Vincent Delporte wrote:
> On 31 Jul 2006 07:05:27 -0700, "Ben Sizer" <kylotan at gmail.com> wrote:
>> Typically you run PHP as a module in your webserver, so there should be
>> no process startup overhead. mod_python provides the same sort of
>> functionality for Python, but is not as popular or widely installed as
>> the PHP Apache module.
> 
> So, if mod_python provides the same functionality, it's not the main
> reason why Python developers use application servers while PHP users
> still program with page codes in /htdocs.
> 
> Why do PHP users stick to that old way of things? Because they mostly
> use shared hosts, with no way to install their application server?

PHP has never been designed to allow writing such a thing as a web
server (some may say that PHP has never been designed at all, but this
is another troll^Mquestion). IIRC, it was initially meant to run as cgi,
then rewrote as an apache module.

And the fact is that while there's no startup overhead in PHP (at least
when deployed as a module), you still have to rebuild the whole world
(includes, app-specific conf etc) for each request. This is what
long-running application servers try to solve.

mod_python is at once lower-level and a bit more powerful than PHP. It
really exposes most of Apache's API to Python - which BTW doesn't make
it that well-suited for shared hosting... (most of the time, updating a
mod_python based app requires restarting the server).


-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list