[Zope-CMF] Re: Events/Future of CMF?
Tres Seaver
tseaver at zope.com
Wed Oct 13 14:43:20 EDT 2004
Sidnei da Silva wrote:
> Is there any concrete plan for adding Events to CMF? It would be
> really nice if we could somehow use Five for that, but given all the
> constraints, what options we have?
Events are the major new feature planned ATM for CMF 1.6. My intent for
them was to use the "thrown-over-the-wall" Zope 2 event products as a basis:
- http://cvs.zope.org/Products/Event
- http://cvs.zope.org/Products/EventListenerTool
as the basis for a CMFEvent product. Those tools are used in production
in very large sites, and have been pounded pretty hard. Note that the
listener tool allows you to define interface-based subscriptions, which
invoke arbitrary scripts: that is a pretty powerful combination.
We would then modify the current content classes to pubish events
(following the Zope3 pattern as closely as possible) rather than
directly notifying the workflow, or cataloguing themselves, and make the
appropriate tools subscribers via the listener tool.
> I've implemented a very simple event registry, highly based on Zope3
> events, which I think would be more than enough for most of the use
> cases. Would anyone be interested in adding this into CMF while we
> wait for the day some Zope3 stuff gets merged into Zope2?
>
> Doctest attached. The implementation is about the same number of lines
> as the doctest *wink*.
The tools above are "placeful" ("local" in the Zope3 sense), which seems
to be more Zope2 / CMF like than the global one (they allow
subscriptions to persist across restarts, for one thing).
Tres.
--
===============================================================
Tres Seaver tseaver at zope.com
Zope Corporation "Zope Dealers" http://www.zope.com
More information about the Zope-CMF
mailing list