[Grok-dev] Re: Salt & z3c.autoinclude

Martin Aspeli optilude at gmx.net
Tue Mar 25 19:40:34 EDT 2008

Martijn Faassen wrote:

> I can imagine a design where we load up an extra plone.zcml file if it's 
> there too. I don't think this is a good idea though.
> I think a Zope package with optional Plone stuff should typically be 
> *two* packages - the Zope one, and then a Plone specific one that 
> depends on the Zope one. Having an "optional view that works best with 
> Plone" is a recipe for evolving the package to "it only works with 
> Plone" anyway (I've seen this happen). Splitting it up into multiple 
> packages is just plain good engineering.
> I know that some people use ZCML in a very different way and have 
> fundamentally different ZCML files for the same package, and are really 
> adamant we should not get in the way of this use case. I think that's 
> all we should do: not get in the way (the directive doesn't *have* to be 
> used), but otherwise not worry about it - they're going to include their 
> ZCML manually anyway.

In general I agree with this and I'm a strong advocate of the "two 
packages" approach - this is why we have the plone.* namespace for 
things built by the Plone community that we envisage being reusable 
outside Plone, and plone.app.* for things intimately tied to 

The only thing that worries me is that we are doing this automatically 
here: looking up entry points, pulling in ZCML. In my experience, you 
often need a little bit of extra control for the corner cases. If we at 
least avoid shutting the door to such control being added (and I think 
we're fine with the current state of things) then that gives me peace of 


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