On 11/15/05, Sean Cazzell <[EMAIL PROTECTED]> wrote:
> It may be cool to have an exception_flash decorator built in to
> turbogears.  Though I really wish cherrypy had an event system or better
> filtering system so we didn't have to push all of this functionality
> into decorators.

How would you, in an ideal world, see the API as being different with
events or "better filtering"? Always best to start with the ideal and
then make tradeoffs as needed.

I actually think there are certain advantages to the decorator model,
which is why I had started building up functionality in expose. (In
fact, before TurboGears 0.5 there was a point where the
dictionary->Kid/JSON functionality was in a filter). What's nice about
it is that the method defines the functionality that you're exposing
to the outside world. The decorator is basically the metadata about
how you want to expose it. And it's all neatly kept together.

Kevin

Reply via email to