[Zope3-dev] More name game suggestions

Ken Manheimer klm@zope.com
Sun, 9 Dec 2001 13:44:44 -0500 (EST)


On Sun, 9 Dec 2001, Martijn Faassen wrote:

> Guido van Rossum wrote:
> >
> > I'll stay out of the naming discussion (this is Zope's cross to bear)
> > but the practical distinction becomes clear from the description of
> > how they are used in Jim's original Wiki page
> >
> >  http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/SecurityFramework
>
> Wrong page? Can't find anything on utility on this page..

(Maybe guido was referring to mention of 'services', not 'utilities'...)

> > When you use a "service", there is this notion that you vaguely ask
> > for one and the one nearest to you gets the request; that one will
> > communicate with others of the same kind higher up in the hierarchy
> > and eventually give you a result.  (Similar to methods and method
> > overloading.)
> >
> > When you use a "utility" you pick one you like and that's the one you
> > get.  (Similar to a function, I guess.)
>
> Yes, I got a similar impression, but apparently either Ken typoed or has
> a different idea (or I read him wrong). From his new cheatsheet:

I'm also trying to get my bearings here, so i may have gotten scrambled -
will be interested to hear the authoratative word.  However, those items
in the cheat sheet are from my notes, from descriptions given pretty
unequivocally.

> > Service component type
>
> > Core tools whose functionality is used by many different types of
> > components - correspond to CMF "tools". Service manager is the most
> > fundamental - the "big flat lego sheet, on which the rest of the legos
> > are placed".
>
> > Contrast with Utility - name of Service is crucial, can have multiple
> > services that implement same interface in the same place, distinguished
> > by name.

For instance, from Step5/README.txt of the tutorial:

  component-management facilities. A common use of services is to
  manage components. There are services for managing presentation components,
  features, utilities and services. Services may provide other

So i suppose you could have different services for managing different
kinds of components, and since they all implement the same interface, they
would be distinguished by name.

Similarly, different kinds of login authentications services would all
implement the same interface, but convey different user data sources -
distinguished again by name.  You could query by interface when you want
to consult *all* the authentication services, but you may still need to
get one with a particular name.

As i said above, i'm among those still sorting this out, forgive me if
i've increased the confusion!

-- 
Ken
klm@zope.com