Re: summary of discussion was: adapter vs factory Re: implementing zope.component 4.0

Lennart Regebro <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
On Tue, Dec 1, 2009 at 16:28, Martijn Faassen <[email protected]> wrote:
> * abstract factory not called on an object ("utility factory",
> "null-adaptation")
>
>    In: the requested interface
>
>    Process: look up factory. Call factory.
>
>    Out: a new instance that provides the requested interface

When would you need this? As I understand it, the only difference from
the normal utility lookup is that you don't get singletons. IMO that
breaks the concept of what a utility is, so null-adaption is a better
name for that, but that still means you adapt nothing, so it's not an
adapter either. :-)

> * abstract instance retrieval for an object ("utility associated with an
> instance", "adapting to an existing instance")
>
>    In: the requested interface, one or more instances.
>
>    Process: look up instance with input instances as "context".
>
>    Out: a previously registered instance that provides
> the requested interface

Hmm. Singleton adapters, in other words. I can see that as useful, sure.

-- 
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.