[Web-SIG] Future of WSGI

Ian Bicking ianb at colorstudy.com
Tue Nov 24 23:30:20 CET 2009


On Tue, Nov 24, 2009 at 4:16 PM, Sylvain Hellegouarch <sh at defuze.org> wrote:

>  I'm not aware of any problems with representing the request with a
>> dictionary.  Can you give examples?
>>
>
> Though it shouldn't be considered as a problem, the fact that probably no
> existing framework actually use the raw dictionary (there is, in almost all
> cases, a wrapping into a friendlier object), one might wonder why keeping
> such a low level interface rather than directly provide a higher level
> interface is a good idea. After all creating those dictionaries for no good
> reason aside from sending them to the next layer which will map them into a
> WebOb, a yaro, a cherrypy request, or zope request, etc. seems slightly
> pointless (I'm not versed into Python internals, but doesn't it have also a
> cost of creating rather useless objects repeatedly like that?) I know WSGI
> tries hard not to force into one implementation but still...
>

Well, that's hardly a trivial requirement, nor a trivial accomplishment.
 Also the dictionary is a complete and inspectable representation of the
environment, divorced from any possible trickery on the part of frameworks.
 It's a common gateway between servers and frameworks, and can be used as a
gateway between middleware and applications.  And it's really fairly common
for middleware to use the raw dictionary without any object involved.

-- 
Ian Bicking  |  http://blog.ianbicking.org  |
http://topplabs.org/civichacker
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/web-sig/attachments/20091124/8e4ced05/attachment-0001.htm>


More information about the Web-SIG mailing list