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

Steve Alexander steve@cat-box.net
Tue, 29 Oct 2002 09:39:25 +0000


Chris Withers wrote:

> Gary Poster wrote:
>
> >> 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.
> >
> >
> > 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?  

It is "delegation" not "indirection".

You don't need to get an adapter to do lots of things with an object.
You do need to get an adapter if you want to alter an object, and have 
it fully participate in the Zope 3 framework.

For example, you would not need to get such an adapter for a Job in the 
Job Board example. In that case, a JobBoard entirely manages its Jobs, 
and the author made a deliberate decision not to use all of the Zope 3 
framework facilities.

This makes the JobBoard simpler, but it also makes it less flexible for 
integrating into other products, and extending by way of components 
rather than refactoring.

You have a choice.

> That feels a little on the rediculous side.

I don't find it rediculous.
I don't want to mix framework concerns, such as generating events, into 
my content classes. So, such concerns need to go somewhere else.

>  It's not really like that, is it? ;-)

Yes it is really like that.
You have a choice though -- you only pay the price if you want those 
benefits.


--
Steve Alexander