On Mon, Nov 30, 2009 at 22:40, Gary Poster <gary.pos...@gmail.com> wrote:
> Then to the multiadapter concern I raised, all my real-world examples of 
> adapters are to adapt one object so it can be used in a certain way (to 
> integrate with another kind of object).  Power adapters, for instance, adapt 
> a plug (required interface) so it can plugged in to the wall (output 
> interface).  Is there a common real-world example of this for "multiadapters"?

Yup. http://www.amazon.co.uk/Scart-Adapter-Switchable-Plug-Socket/dp/B00077DC6A

Audio + Video in: SCART out. :)

> Turned around, people know the term "singleton" and they do not know the 
> terms "adapters" and "utilities".  "singletons" describe the huge majority of 
> how we use these things.

True. For me utilities are tools. Like CMFs portal_whatever. But in
Zope3 even small stupid singleton objects are utilities in some cases,
and that is confusing for a beginner.

> That said, and to repeat, I mind "adapter" more than "utility."

But adapter is really what it is. OK, Multiadapters are evidently
complicated... But is it really so complicated that we should throw
away the commonly accepted GoF for what clearly are adapters? How is
it less confusing to call IFoo.instance(x,y) than IFoo.adapt(x,y) or
even IFoo(x,y)?

Lennart Regebro: Python, Zope, Plone, Grok
+33 661 58 14 64
Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope )

Reply via email to