PylonsApp seems to do two separate things:
- construct and register objects like request, response, session, g, h, ... - dispatch the request to correct controller (and wrap it with testing support and error handling) Couldn't those two be separated? Why? Well, I would fairly like to write some middleware-like objects (not necessarily reusable, more often app-specific) which would benefit from having access to variables like request, response and session. At the moment the choice is between writing generic WSGI middleware (so no WebOb, no session, etc) and stuffing the code into BaseController even if it would look more natural as middleware-like construct. So the suggestion is: what about factoring out PylonsApp into two parts: WSGI Middleware which would construct pylons environment (= construct objects like request, response, session etc) and final application which would just call the controller. Then one would be able to stuff some layer between the two, writing some app-wide processing but having access to handy objects... ? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
