durusmail: quixote-users: Re: [Pyweb] Re: [Python-Dev] Improving the CGI module
Re: [Pyweb] Re: [Python-Dev] Improving the CGI module
Re: [Pyweb] Re: [Python-Dev] Improving the CGI module
2003-09-22
Re: [Pyweb] Re: [Python-Dev] Improving the CGI module
Paul Boddie
2003-09-22
Ian Bicking  wrote:
>
>On Friday, September 19, 2003, at 04:26 PM, John Belmonte wrote:
>>
>> I would like to see modules such as Quixote's http_request and
>> http_response (which were taken from Zope) improved and
>> incorporated into the standard library.  They do the essentials
>> like manage headers, status, encoding, and cookies.  Something I
>> found useful was that they can even parse headers such as Accept
>> and give you a dictionary of MIME types that the client will
>> accept.  The mod_python modules might also offer some ideas.

I've come round to the idea that providing some libraries which handle the most
commonly processed information associated with HTTP requests/responses would be
very attractive indeed. Consider someone wanting to write their own request
dispatching framework (which is still quite likely because many existing
frameworks seem to impose near ideological restrictions on resource naming and
organisation): the prime area for reuse is the interpretation of request data
which is pretty much always done in the same way regardless of the framework
employed.

>I think this would be an excellent idea -- providing some (*any*)
>basic request and response implementation/interface would
>(hopefully) provide some sort of basic vocabulary for generic
>Python web packages (i.e., packages that aren't tied specifically
>to one framework).  Right now there isn't even a lowest common
>denominator, even though the differences in the implementation of
>these interfaces isn't that great.
>  If all a cgi (or web or whatever) module did was provide a
>request and response object, that'd be a big improvement.

Agreed. I'd also suggest that any reference library be as stateless as possible;
in other words, a set of functions and classes which don't require bizarre
initialisation rituals and/or employ callbacks for the fun of it.

Paul


____________________________________________________________
Free 20MB Web Site Hosting and Personalized E-mail Service!
Get It Now At Doteasy.com http://www.doteasy.com/et/

reply