[Zope3-dev] Re: One namespace for ZCML

Philipp von Weitershausen philipp at weitershausen.de
Tue Feb 14 09:21:23 EST 2006


Tres Seaver wrote:
>>>Just note that I'm explicitly not addressing automation as a use case for
>>>custom ZCML directives. I believe automation is best done in Python. If you're
>>>trying to invent a new ZCML directive that does something else to an
>>>adapter/view/utility before registering it (e.g. putting an interface on it,
>>>adding attributes, wrapping it in a factory etc.), then that should be done in
>>>Python. zope.formlib is a good example of how browser:page is enough for
>>>registering a form as it isn't ZCML's concern *what* kind of page we're
>>>registering. All that is in Python.
> 
> I'll aggree to an extent:  where this pactice breaks down is when the
> "argumentes" to the automation need to be supplied as configuration.  At
> that point, a wrapper argument which allows the user to specify those
> values without writing / modifying PYthon can be a win.  In the case of
> Shane's "webroot" proposal, for instance, the filesystem path to the
> root would be best specified as an attribute to a custom directive, even
> if the directive did nothing more than configure a single global utility.

In another post I said that this use case is ok because it actually
configures this component. That's one of the intended usecases of ZCML.
Automation isn't, but then again what you're describing above isn't
automation either, so all we're doing right now is agreeing with teach
other :).

Philipp



More information about the Zope3-dev mailing list