[Zope3-dev] Re: Need help with jargon

Philipp von Weitershausen philipp at weitershausen.de
Fri Apr 2 10:23:43 EST 2004


Steve Alexander wrote:
> In that case, let's call utilities "singletons", as that's the role they 
> play in an application.  Let's call multi-adapters "utilities" as PJE 
> suggests, and let's call PEP 246 adapters "adapters" as PEP 246 suggests.
> 
>   Current                          Proposed
> 
>   adapter (PEP-246 style)          adapter
> 
>   multi-adapter / named adapter    utility

-1

Of course, I'm indoctrinated by Zope3's using "utilities" for describing 
singletons, but even so, "utility" suggests a tool-like component that 
aides my application. It does not suggest an adaption based on interface.

>   utility                          singleton

+1

> I think what we currently call "utilities" should be called "singletons" 
> because this aspect of their nature is currently important but rather 
> subtle and easily missed by users of Zope 3 and the component architecture.

+1

> If they were called "singletons" then:
> 
> - The term "utility" would be available to describe multi-adapters.

That's not a good conclusion. At least not one that I would draw. I am 
-1 on calling multi-adapters "utilities".

Let me draw an analogy which I often use when explaining adapters:

In England, they have different plugs for the electrical system than 
they have on the European Contintent. If I bring an electrical device to 
the UK, I need an *adapter* so that my plug fits the outlet. This 
adapter is 100% mechanical, since it adapts two (or three if you count 
ground) prongs to two prongs.

Now, I'll extend this analogy:
I take that electrical device to the U.S. They have a different voltage 
and frequency there. A mechanical adapter won't help me now. I need 
something that does more than just a mechanical adaption. I need a 
*converter* or *transformer*. Who knows, if some country was running 
their electrical system with three phases instead of just one, I would 
even have a different number of prongs on both sides of the converter.

Taking it back to the Component Architecture, I feel that multi adapters 
are very much like converters. Since they have to take more than one 
object or even zero into account, it cannot be a simple mechanical 
adaption anymore. It's a real process going on. A view, being a multi 
adapter, is a good example.

So, I propose to call them Converters or Transformers.

Philipp




More information about the Zope3-dev mailing list