[Zope3-dev] ObjectHub/Event service: who sends those events anyway?

Gary Poster gary@zope.com
17 Oct 2002 10:13:20 -0400


On Thu, 2002-10-17 at 05:21, Chris Withers wrote:
> Gary Poster wrote:
> > class IVocalContainer(ICopyPasteContainer):
> 
> Why introduce complexity? What's the use case for a NoneVocalContainer?
> (I'd see them as a PITA to deal with :-S)

The idea is that IContainer is the simple core version and we are adding
bells and whistles upon it--and the base interface is important not only
for the definition of simplest behavior but also in fact likely to be
needed for simple objects.

> >     def setObject(key, object):
> >         """sets object and sends an IObjectAdded event"""
> >     
> >     def silentSetObject(key, object):
> >         """does not send an event; used by moveTo and duplicateTo"""
> 
> YAGNI.

shrug.  For this approach I NI (Need It).

> >     def __delitem__(key):
> >         """deletes object and sends an IObjectRemoved event"""
> >     
> >     def silentDel(key):
> >         """does not send an event; used by moveTo"""
> 
> YAGNI

as above.

> > Notice that's a new event type--IObjectDuplicated.  Presumably it would
> > need a hub event parallel as well.
> 
> Why? What's wrong with an added?

Different connotation.  Probably would be a subclass of added.

> > Then the folder handles all of the events for the contained objects
> > except for IModified.  I think one possible ObjectHub subscriber might
> > reject any moves that tried to move a registered object into a
> > non-IVocalContainer, for instance.
> 
> YAGNI

same as the other "silent" stuff.