[Zope-dev] summary of discussion was: adapter vs factory Re: implementing zope.component 4.0

Charlie Clark charlie.clark at clark-consulting.eu
Tue Dec 1 11:24:16 EST 2009


Am 01.12.2009, 17:08 Uhr, schrieb Lennart Regebro <regebro at gmail.com>:

> I'm +1 for 5.

"wot he said" x 10 :-)

The video + audio to scart example struck me last night and providing  
expressive(?) examples of this to match so that one is less easily caught  
by tuples as arguments is a doddle.

cables = (audio, video)
connector = IScart.adapt(cables, "HDTV")

Assuming I haven't got totally the wrong end of the stick this shouldn't  
confuse anyone.

Now, do we have any similar simple but expressive analogy for utilities?  
Soap dispensers?

ISoapDispenser.utility().dispense() # agained, spelled out for clarity  
seeing as that's all the utility does.

I hope my analogies aren't too far off the mark. Helps me a lot not to  
think about what's really going on.

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226


More information about the Zope-Dev mailing list