views:

53

answers:

1

Just trying to get a feel for what common middleware people use in pylons?

Is middleware just the main pipeline for the request and response object?

i.e. would it be possbile to create a very simple middleware that outputs 'hello world' to the screen?

+1  A: 

The default middleware is the pipeline, as you guessed. However, my impression is that after that, "common middleware" is slightly oxymoronic, especially for a loosely coupled framework like Pylons. The framework's setup suggests "here is the basic middleware - and here's where to put middleware that you write yourself to satisfy your individual needs." I could be talking through my hat, but that's how it feels to me - when I've thought "should that be middleware?" about modules of mine, the answer has always so far turned out to be "nope, I can just put that in a controller." So - be aware of scope and don't boot things to a middleware layer if you can gracefully keep them closer to the context where you need them.

Further: The WSGI wiki has a list of middleware that may also go some ways towards answering your question.

Sean M