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

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


On Thu, 2002-10-17 at 08:30, Steve Alexander wrote:
<snip the copy/paste interface> 
> How can a container know how to duplicate things?
> Does duplication happen at the ZODB level, or at the application level, 
> or either, depending on some adapter?

I believe it is an adapter kind of thing.

<snip the vocal inetrface>
> > 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.
> 
> Not really.
> 
> Containers don't need to know about events. Content classes don't need 
> to know about events.
> 
> There is a separate class of components, which you might call 
> "Management Components", that mediate between something that wants to 
> manipulate a component, and the component itself.

<snip>

Ack... yet another level of indirection.  Yes, I seem to recall this
from some Zope 3 reading in the past.  

Now I have to get an adapter just to do *anything* with an object?  And
for something as important as the objectHub (== cataloging, among other
things) and the EventService, we are relying on all application
developers remembering to call an adapter to get their objects before
they do anything at all?  I.e., in what you write, if I inadvertently
merely try to drink the water, rather than asking my IManageGlassOfWater
butler to drink it for me, then I break whatever cares about the event. 
While I can appreciate the elegance, I'm concerned about the
practicality.

hmm.  Thoughts?  This issue won't stop me from checking the ObjectHub in
soon, of course, but we are now very near the point at which this
decision must be made, I think.

Gary