Re: [Web-SIG] Standardized configuration

2005-07-19 Thread Ian Bicking
Chris McDonough wrote: > On Mon, 2005-07-18 at 22:49 -0500, Ian Bicking wrote: > >>In addition to the examples I gave in response to Graham, I wrote a >>document on this a while ago: >>http://pythonpaste.org/docs/url-parsing-with-wsgi.html >> >>The hard part about this is configuration; it's eas

Re: [Web-SIG] Standardized configuration

2005-07-19 Thread Ian Bicking
Phillip J. Eby wrote: > At 07:29 AM 7/17/2005 -0400, Chris McDonough wrote: > >> I'm a bit confused because one of the canonical examples of >> how WSGI middleware is useful seems to be the example of implementing a >> framework-agnostic sessioning service. And for that sessioning service >> to b

Re: [Web-SIG] Standardized configuration

2005-07-19 Thread Shannon -jj Behrens
It seems to me that authentication and authorization should be a put into a library that isn't bound to the Web at all. I thought that those guys reimplementing J2EE in Python did that. :-/ Oh well, -jj On 7/16/05, Chris McDonough <[EMAIL PROTECTED]> wrote: > I've also been putting a bit of thou

Re: [Web-SIG] Standardized configuration

2005-07-19 Thread Ian Bicking
Phillip J. Eby wrote: >> In many cases, the middleware is modifying or watching the >> application's output. For instance, catching a 401 and turning that >> into the appropriate login -- which might mean producing a 401, a >> redirect, a login page via internal redirect, or whatever. > > > A

Re: [Web-SIG] Standardized configuration

2005-07-19 Thread ChunWei Ho
Hi, I have been looking at WSGI for only a few weeks, but had some ideas similar (I hope) to what is being discussed that I'll put down here. I'm new to this so I beg your indulgence if this is heading down the wrong track or wildly offtopic :) It seems to me that a major drawback of WSGI middlewa

Re: [Web-SIG] Standardized configuration

2005-07-19 Thread mike bayer
While I'm not following every detail of this discussion, this line caught my attention - Ian Bicking said: > Really, if you are building user-visible standard libraries, you are > building a framework. only because Fowler recently posted something that made me think about this, where he distingu

Re: [Web-SIG] Standardized configuration

2005-07-19 Thread Shannon -jj Behrens
Phillip, 100% agreed. Libraries are more flexible than middleware because you get to decide when, if, and how they get called. Middleware has its place, but it doesn't make sense to try to package all library code as middleware. Even when you do write middleware, it should simply link in libra

Re: [Web-SIG] Standardized configuration

2005-07-19 Thread ChunWei Ho
> (b) > Have chain application = authmiddleware(fileserverapp) > Use Handlers, as Ian suggested, and in the fileserverapp's init: > Handlers( > IfTest(method=GET,MimeOkForGzip=True, RunApp=gzipmiddleware(doGET)), > IfTest(method=GET,MimeOkForGzip=False, RunApp=doGET), > IfTest(method=POST,Mim