[Zope3-dev] Re: ObjectHub notes: adding objects

Steve Alexander steve@cat-box.net
Thu, 17 Oct 2002 11:33:47 +0000


> I've been working on an implementation of a local ObjectHub as well as
> some other tricks.

Cool.


> In the current check-out's implementation, a (standard, non-ObjectHub)
> IObjectAdded event that makes its way to the ObjectHub is transferred
> unmodified to interested subscribers.  A subscriber may then request the
> ObjectHub to register the added object, generating an
> IObjectRegisteredHubEvent.  Then the ObjectHub finishes processing the
> original IObjectAdded event and so, seeing that the added object is now
> part of the ObjectHub registry, sends out a parallel
> IObjectAddedHubEvent.
> 
> PROPOSAL 1: Let's just get rid of the IObjectAddedHubEvent.  I don't see
> any compelling use cases.  I think this was a conclusion to which Jim
> had already come, but just want to make sure, because I don't see this
> decision written down anywhere.


Ok. After some consideration, I'm +1 on this.

This decision says something interesting about the ObjectHub and its 
plugins: that is, as far as HubIdEvents go, we're only interested in 
what happens during the time during which an object is registered with 
the hub -- between ObjectRegistered and ObjectUnregistered events.

The adding of an object, which may trigger its registration is outside 
of this scope, and so we're not interested in *why* the object was 
registered, just that it was registered.

If a plugin needs to know that an object was specifically added (rather 
than just registered for some other reason, such as a change in workflow 
state), the plugin will have to listen for the regular kind of 
ObjectAdded events.

--
Steve Alexander