[Zope-dev] summary of discussion was: adapter vs factory Re: implementing zope.component 4.0
Martijn Faassen
faassen at startifact.com
Tue Dec 1 11:26:27 EST 2009
Gary Poster wrote:
> You are leaving out the variants of 3 and 4 that allow calling the
> interface to support multiadaptation, but do not unify utilities.
True, my mistake. Lennart pointed that out too just now.
> My impression is that I am not the only one who is not pleased with
> the proposed unification of utilities and adaptation.
I've tried to analyze why that might be so elsewhere. There are three
perspectives that I can see:
* everything registered is really a factory. Returning a utility just
requires registering a special factory.
* everything registered is really an instance. Calling an adapter is
just looking up an instance and then calling it.
* we have two kinds of things registered, instances and factories.
zope.component does that today.
> My impression is that we are nearing consensus on the variation of 3
> that does not include utilities.
I could live with that, as long as we had a way to look up utilities on
the interface too.
Regards,
Martijn
More information about the Zope-Dev
mailing list