[Grok-dev] view predicates in Grok?

Martin Aspeli optilude+lists at gmail.com
Mon Jan 4 22:21:55 EST 2010

Souheil CHELFOUH wrote:
> This is interesting, this whole predicate stuff, but, technically and
> very concreatly, where would we plug that ?
> Views, as multi adapters, are fetched through the classical publisher
> mechanism, how can we plug our own modifications, without messing up
> too deep into the machine ?
> Grokcore.view, up to now, is mostly a way to not write zcml and
> doesn't do much more. This is an extra step, isn't it ?
> What would it affect, effectively ?

I think "right" thing to do here would be to factor the predicate stuff 
out into a separate package (say, respoze.predicates or even 
zope.predicates) and then have BFG and grokcore.* depend on that. It'd 
probably need an imperative configuration UI to sit around 
zope.component's convenience API. It'd also probably be the home of the 
"multiadapter" use case.

I'd be very interested to use some of this stuff in Zope 2.12/Plone so 
it'd be a net win to have it work generically. We could build "classic" 
ZCML handlers into the package, maybe as an extra; repoze.zcml handlers 
already exist. And martian grokkers could follow Paul's suggestions, and 
then be usable in five.grok too.

What a nice example of our communities working together this would be. ;-)


Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book

More information about the Grok-dev mailing list