[Zope3-dev] ObjectHub notes: removing objects
Gary Poster
gary@modernsongs.com
20 Oct 2002 13:58:42 -0400
On Sun, 2002-10-20 at 09:12, Steve Alexander wrote:
> I suggest that not every object should be hooked into the event system.
> Rather, every "significant" content object is hooked into the event
> system. What makes a "significant content object" is related to Jim's
> recent discussion question of "what is a content type?".
agreed. I misspoke.
...
> > This might be annoying and fragile if the programmer had to get the
> > adapter every time IMHO. Maybe this solution could move towards the
> > idea of this kind of wrapper being part of the traversal mechanism,
> > which might just be the best thing--I haven't thought that through, and
> > I haven't heard anyone actually propose it, and it probably is a bit
> > frightening :-).
>
> Hey, that's a cool idea! I have no idea how it would play out, but it
> deserves some thought :)
:-) Whatever the solution, we *have* to have something relatively
robust and easy to use, or anything we build on the event service will
be built on sand.
> > The other approach (which I have on occasion espoused) says that folders
> > might need to send some of the pertinent events themselves about their
> > contents. If this were the case, we would simply need to raise errors
> > whenever someone tried to do something such as what you describe (i.e.,
> > the object hub might say to a registered object that tried to move into
> > a non-event-sending folder, "sorry, you can't move *there* because I
> > can't hear you!")
>
> Too Zope2-mixin-classy for my tastes ;)
agreed, but neither current solution appeals to me, and I'll lean
towards practicality and away from grace when I deem it necessary. I am
not convinced think the adapter thing will fly practically.
...
> This is one of the reasons that the EventService filters events based on
> the type of event, and there are EventChannels to further filter and
> route events. You don't want unnecessary things happening when you send
> off an event, as that will slow everything down.
I have an idea on this, btw. I want an event service that creates
channels transparently and automatically...I'll explain later, though,
because it is a polish to the service and we still have a few gut
decisions to make and implement (mostly how the events are fired, as
discussed above).
Thanks for the clarification. :-)
Gary