[Zope3-dev] Re: registerUtility(component, interface) vs provideUtility(interface, component) vs provideUtility(component, interface)

Philipp von Weitershausen philipp at weitershausen.de
Tue Sep 5 08:26:49 EDT 2006


Stephan Richter wrote:
> On Tuesday 05 September 2006 07:55, Jim Fulton wrote:
>> On Sep 2, 2006, at 5:33 AM, Philipp von Weitershausen wrote:
>>> The order of arguments is the same. I think Jim wants the  
>>> convenience functions in zope.component (provide*) to go away in  
>>> favor of the explicit spelling through the global site manager. I  
>>> think that before we do that, we should first abolish the term  
>>> "site manager" from the zope.component API (because we don't call  
>>> it site manager anymore).
>> Yup.
> 
> Since we are at it, I would love to have z3c.baseregistry in the core for Zope 
> 3.4. Jim, I would like you to review it  It is a pretty small package, so it 
> should not take long.

+1

> As a side note: I noticed the difficulty of writing about the "components 
> registry" or just "components". I think this is somewhat facilitated by the 
> fact that the module is called "*registry.py" and the classes "*Components".

Yeah, I was never a big fan of that nomenclature. I think the fact that 
"a components" is a singular/plural combination is confusing. I don't 
remember whether or not I told Jim that at PyCON, though.

I refer to these things as "component registries" in my new book, even 
though IComponentRegistry is just one half of IComponents (the other 
half is IComponentLookup). But what good is a registry if you can't do 
lookup things from it ;).

Philipp



More information about the Zope3-dev mailing list