[mod_python] framework agnostics

Jorey Bump list at joreybump.com
Wed Jun 8 01:07:31 EDT 2005


michael bayer wrote:
> This is interesting....Graham Dumpleton basically said that  
> environment-agnostic frameworks have to build down to the lowest  common 
> denominator and therefore the developer loses most of the  "special" 
> functionality you get with apache and mod_python, whereas  here you're 
> saying the amount of framework-specific code should be  very minimal and 
> therefore you could probably port your applications  to other frameworks 
> quite easily.   Which is strange, both reasons  are seemingly in direct 
> conflict with each other yet both have a lot  of truth to them.

I don't think they're in conflict. As Graham indicates, frameworks are 
available at different levels in terms of functionality and the tools 
offered to developers. Once you've removed the code that supports the 
purpose of your application, you're left with the interface code. My 
point is really one of style, that you should keep support code separate 
from interface code, making it easier to reimplement using other interfaces.

Even if WSGI offered true portability, I'd code the same way. Yes, it 
would be nice write the web interface once and have the opportunity to 
move it to another environment without modification. But is that what 
WSGI really offers? It seems that a variety of frameworks will be built 
upon the WSGI API, so I'll still be faced with reimplementation in 
whatever framework is available in the target environment, rather than 
use WSGI directly.

It looks like WSGI is a worthy attempt to achieve the usefulness of 
something like the Python Database API, which has eased the task of 
working with databases significantly, but doesn't quite allow one to 
write applications in a completely database-agnostic way. Still, it's a 
great evolutionary step forward, so it will be interesting to see if 
WSGI shares a similar success.



More information about the Mod_python mailing list