[Zope3-dev] ObjectHub notes: adding objects

Godefroid Chapelle gotcha@swing.be
Thu, 17 Oct 2002 09:36:50 +0200


At 21:09 16/10/2002, Gary Poster wrote:
>The current ObjectHub implementation and interface disagree on the
>meaning and behavior of two events: IObjectAddedHubEvent and
>IObjectRemovedHubEvent.  They are described in the interfaces as
>subclasses of IObjectRegisteredHubEvent and IObjectUnregisteredHubEvent,
>respectively; however, their behavior in the current implementation is
>different.  I'd like to bring this to light, discuss it briefly, and
>resolve it quickly.  To some (perhaps large) degree, this is a rehash of
>some things discussed before with Jim and Steve and Casey, but I want to
>make sure that I'm on the right track with my changes.

During EuroPython sprint, we already spoke a lot about this problem with 
Steve and Holger Krekel.
Few weeks ago, changes made after discussion between Steve, you and I were 
reverted.

So we certainly need to think about it once again.

>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.

I think we shoul make it clear what the semantic of each HubEvent is before 
deciding to get rid of one of them.
Not that I am against the idea. Just that some things are still unclear 
enough to make us rethink each time someone works on ObjectHub.