Re: implementing zope.component 4.0

Lennart Regebro <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
On Mon, Nov 30, 2009 at 22:40, Gary Poster <[email protected]> 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
http://regebro.wordpress.com/
+33 661 58 14 64
_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.