[Zope-PTK] Hooks

Shane Hathaway shane@digicool.com
Fri, 18 Aug 2000 14:11:59 -0400


Fabio Forno wrote:
> 
> Shane Hathaway wrote:
> 
> > > if hasattr(self,'hook_function'):
> > >   self.hook_function()
> >
> > Okay, I think what we'll do is create versions of the tools that
> > provide hooks in the right places.  It would be beneficial if you would
> > list for us the hooks we ought to provide (such as
> > WorkflowTool.beforeChangeState(), WorkflowTool.afterChangeState(),
> > etc.)
> 
> Perhaps it's a crazy idea, but what about a fully configurable hook map,
> so that we allow the users to add the hook they want?

An interesting idea.  The one concern I have is that users really won't
care about writing hooks for most things.  For any sufficiently sizable
change, users will want to write subclasses, not hook implementations. 
If you can develop an argument against that, I see no reason why we
shouldn't write a generalized "hookable tool generator" that does all
the work for us.

Shane