[Zope3-dev] Re: wildcard adapter

Martijn Faassen faassen at startifact.com
Fri Jan 19 08:09:18 EST 2007


Marius Gedminas wrote:
> On Thu, Jan 18, 2007 at 08:55:17AM +0000, Chris Withers wrote:
>> Marius Gedminas wrote:
>>> BTW passing interfaces to provideAdapter/<adapts> is out of fashion. 
>> This stuff is getting almost perl-ish in it's "there's many ways to do 
>> it, pick the style you like" nature..
> 
> There's a slight difference, I think.  In the Zope 3 world, there's
> usually one style that is considered to be the best way of doing stuff.
> Only it varies with time and with individual Zope 3 developers. ;-)

Well, I'm sure with Perl the best way of doing stuff also varies with 
time and with individual Perl developers. :)

I agree the "you should now not write this bit in ZCML but in the class 
itself" is frustrating, as the other way isn't forbidden and there is 
endless example code out there which does it that way.

Grok lets you write everything in the class and do away with the ZCML 
entirely. I believe this to be a superior pattern as it's quick to 
write, simple to understand and doesn't require switching context to 
another file to figure out what's going on. It also gives you error 
messages if you do something Grok cannot figure out.

Regards,

Martijn



More information about the Zope3-dev mailing list