Dave Britton
dave at davebritton.com
Tue Dec 1 09:50:04 EST 2009
On Fri, 2009-11-27 at 22:46 +1100, Graham Dumpleton wrote: > A few questions. > > If you don't use publisher, what parts do you use? > > 1. PSP? > 2. cgihandler? > 3. FieldStorage? > 4. Session? > 5. Cookie? > 6. import_module() and import overlay? > 7. request_rec, server_rec, conn_rec wrappers? > 8. ap_internal_redirect() wrappers? > > Overall, what is it about mod_python that you are doing would make it > a better platform that WSGI? > > Are you aiming for 100% compatibility or more just the style of > writing applications? > > Some stuff like Cookie and FieldStorage could be switched to more > modern Python standard library equivalents, but obviously they would > not be wholly interface compatible. * I want an easy, straightforward way to create web applications with python scripts. MP/Publisher provided that, more or less, easier than WSGI by itself, where I need to use yet another wrapper, all of which have added baggage to learn and problems to find out about and features to avoid using. * Basically, all I mostly need to do is efficiently process forms POSTed with hidden variables, so easy management of cgi variables is important, eg. FieldStorage. * I really like the ability to hide the dot-py file extension that MP offered, although it always seemed finicky to muck about in the apache conf to get the precise combination of Add and Set handlers and Directory specs required. * Being able to import new modules without restarting apache would be nice. WSGI seems an improvement in both of these last two regards. * I never trusted cookies or sessions in MP so I do them myself with MySQL and a passed-in cgi token, so a trustable database connection management system would be convenient, although I admit I have always opened and closed connections just when and only while needed, with no apparent performance problems, and had a warm feeling inside that the data always got saved, offset ocassionally when I forgot to close a connection and crashed the system with too many open. * I never used psp, preferring to incorporate my html inside functions instead of vice versa. * Internal redirection was something that I have occasionally made use of, and would like to have available from within my python scripts, easily. Not having to deal with headers etc. is a nice thing too. Thanks for asking! -Dave
|