[Zope-PTK] Hooks

Paul Everitt Paul@digicool.com
Sat, 26 Aug 2000 06:43:38 -0400


Shane wrote:
> 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.)

FWIW, we ought to take a look at the event model defined in the DOM
Level 2 specification.  From the introduction at 6.1:

"""
The DOM Level 2 Event Model is designed with two main goals.  The first
goal is the design of a generic event system which allows registration
of event handlers, describes event flow through a tree structure, and
provides basic contextual information for each event.
"""

Though we don't have an event model in Zope, this thread is getting
close to an observer model.  I think we should try to leverage DOM
attributes and method names where possible, and also look at the DOM
architecture as a whole for new ideas.

I just read the DOM spec during this two week vacation.  It was eye
opening.  They have deeply specified an architecture which is general to
many kinds of object systems.

--Paul