[Zope-dev] Context priority as an alternative to configuration directive overrides

Charlie Clark charlie.clark at clark-consulting.eu
Thu Dec 2 15:43:52 EST 2010


Am 02.12.2010, 14:19 Uhr, schrieb Malthe Borch <mborch at gmail.com>:

> As far as I understand, for a ZCML include override to work properly,
> you need to carefully make sure that your includes are in the exact
> right order and on the same level. In a system where two packages are
> trying to override the same component (should arguably never be the
> csae, but it is frequently), it can be difficult to get it right.

> Priorities on the other hand are absolute, globally. It's easy for
> anyone to see that the highest priority wins, no matter the order of
> inclusion.

-1 on priorities - how do you resolve the case where the priorities are  
the same? The proposed solution introduces an additional complexity which  
could get even more baffling than the current one.

I would much prefer a cascading/layered/subclass approach but I suspect  
this might not be possible with the current implementation, so I  
sympathise entirely with your complaint. As a developer you kind of  
imagine that your application layer ought to "win" just as your subclass  
"wins". Can we get some kind of diamond rule?

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