Hi Alice,

Thanks for your reply.

Alice Zoë Bevan–McGregor wrote:
> From my own personal fork of Web.py (http://github.com/GothAlice/webpy/)
> I've introduced more literal object/method dispatch (without the
> distinction between get, post, head, etc.) which can be seen illustrated
> on the following Wiki page:
> http://wiki.github.com/GothAlice/webpy/object-dispatch-example.


I've read your announcement and think it looks interesting, but the
default class dispatching mechanism of web.py is much more convenient
for me. The regexp matching of the url which simultaneously generates
the handler method parameters (like GET(self, id)) saves me a lot of
work in parsing and validating complex urls myself.


> For the most part I use the add_processor extension method to add
> pre/post request hooks to my code.  As an example, from the Web.py
> cookbook article on adding SQLAlchemy ORM support, I've used the
> following in my code to automatically handle database sessions:


I've looked into the preprocessors, and while they are a great idea for
some stuff, I can't get hold of the handler class instance from there.
The handler parameter is either the next preprocessor in the chain or
the handle() method of the web.py application that does the actual
instantiation of the handler class and calls the appropriate method. So
I haven't found a method to inject dependencies from there.


Cheers,
Ole.


-- 
Ole Trenner
<[email protected]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to