[Zope-CMF] opaque items, events

Kapil Thangavelu k_vertigo at objectrealms.net
Mon Dec 6 16:21:46 EST 2004

On Mon, 2004-12-06 at 18:16 +0100, Florent Guillaume wrote:
> I never realized this had been checked in in CMFCatalogAware:
> +        # Other opaque items than 'talkback' may have callable
> +        # manage_after* and manage_before* hooks.
> +        # Loop over all attributes and add those to 'items'
> +        # implementing 'ICallableOpaqueItemWithHooks'.
> +        self_base = aq_base(self)
> +        for name in self_base.__dict__.keys():
> +            obj = getattr(self_base, name)
> +            if ICallableOpaqueItemWithHooks.isImplementedBy(obj):
> +                items.append((obj.id, obj))
> I'm really concerned, this is extremely costly. *All* instance 
> attributes will be interated upon, and then we'll have to get each 
> subobject from the ZODB (argh!!!) to check what it implements.
> Is there any way to remove this?
> Who uses ICallableOpaqueItems? I know CMFUid does, and it pains me to 
> say that, but any proper UID implementation should use an event system 
> to hook itself into the framework. And CMFUid is really heavy code too. 
> I mean, three tools to manage simple uids... I can't see myself using it 
> as is...
> We really need to add events to Zope 2 or CMF. Zope 3 couldn't live 
> without them, CPS couldn't live without them. Many many ugliness, such 
> as this explicit manage_after* and business, goes away when they are 
> available.
> Currently CPS monkey-patches Zope and CMF to publish events on object 
> creation/destruction/clone. Could we add these simple hooks before the 
> rest of the framework is in place ?

so there are two thingies needed. an event framework an integration of
the event framework within objectmanager core and cmf tools.

for event framework, tres suggested the interfaces and default
implementation of the Event product in zc cvs. does that sound okay?

for the framework integration.. what sort of hooks do you need? do you
have a url to cps monkeypatches ?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/zope-cmf/attachments/20041206/b73077c6/attachment.bin

More information about the Zope-CMF mailing list