[mod_python] mod_python programming books/tutorials? OT?

Jorey Bump list at joreybump.com
Thu Jun 26 09:18:01 EDT 2008


Kurt Häusler wrote, at 06/26/2008 02:58 AM:
> Graham Dumpleton wrote:
>> You do realise that mod_python is itself a framework in some respects,
>> it just happens to be bundled with the hosting solution. A big
>> downside of that is that your code isn't actually portable, so I
>> wouldn't be so quick to dismiss frameworks. 
> In what way is mod_python less portable than a "framework"? Not trying 
> to be smart or make any claims here as I am only just starting out in 
> this area myself.

Applications targeting mod_python rely on Apache httpd and mod_python 
(or even a specific version of mod_python). If you write your 
application to the WSGI specification, as many frameworks have now done, 
   it should be portable to other platforms with WSGI support 
(naturally, the application's own dependencies play a part).

I have a big investment in mod_python, and haven't made the switch to 
WSGI, yet, but will consider it for future projects. Fortunately, due to 
the nature of Python, I don't expect it to be difficult to convert my 
existing applications to WSGI (in some cases, I'll probably end up with 
fewer lines of code). I think mod_python is still a fine platform for 
development, especially if you're committed to using Apache httpd. But, 
if I were just starting out, I'd seriously evaluate the WSGI approach.

> I chose mod_python as it seemed like the dependencies were a lot less 
> than that required by frameworks. (Other reasons include it seemed like 
> a better way to learn the nuts and bolts of whats going on, I wanted a 
> stronger separation / more mix-and-matchability between the "front end" 
> request handling part, the business logic and database ends (ideally 
> only the front end should be framework dependent but frameworks seem to 
> take over the whole project, insisting on particular business logic 
> patterns and ORMs), and I did play around with django a bit and it 
> seemed it did a lot more stuff than I wanted,)

I feel the same way, and have happily avoided frameworks. However, you 
could argue that WSGI provides an even stronger separation than 
mod_python, since it's intended to be server-agnostic.

> Of course I am always ready to switch to a (light weight) framework 
> should I need to, our (agile based) philosophy here is "only as much as 
> needed" so mod_python it is until I reach its limits.

I share that philosophy. Benchmarks and the demonstration of portability 
  (to management) are likely to provide the greatest incentive to move 
to WSGI, but I'm not feeling a lot of pressure at the moment, since 
mod_python has proven to be secure and robust (with many thanks to 
Graham for his improvements; I also expect mod_wsgi to be of high 
quality). I understand that it doesn't solve all problems, but I really 
need to set aside some time to do a proper evaluation of WSGI.




More information about the Mod_python mailing list