On 2/9/06, Michael Schneider <[EMAIL PROTECTED]> wrote:
> I really like the decorator approach,  it seem very similar to
> interceptors in the java webwork framwork.
>
> The webwork folks added the concept of an interceptor stack.  This
> allows interceptors to be grouped together under a tag.

I'm not entirely certain these are the same thing. They serve a
similar purpose: pull common behavior out to a common piece of code.
But a critical part of what they do in TurboGears is to *configure*
that common behavior. Most methods will have different templates
formatting the output. They'll have different sets of validators.
Different authentication requirements.

So, functionally, the TurboGears decorators pull common behavior out.
But, just as important, they configure how that method should
interface with the web. As much as possible, this lets the method look
like a fairly standard piece of Python code.

Kevin

Reply via email to