[Zope3-dev] what is ZCML?

Jim Fulton jim at zope.com
Mon Mar 13 18:56:38 EST 2006


Martijn Faassen wrote:
...
> A newer interpretation of ZCML is:
> 
> """
> ZCML is a configuration language that configures a number of basic 
> directives for configuring the component architecture and security: 
> adapters, utilities, security requirements, and little else.

Right.

> Everything 
> else should be done in Python code,

Sort of.

 > as configuration in Python code is
> more flexible and packages can form a more self-contained whole.

Wrong!

This is an important point. No one in the know is proposing
using Python for configuration.  Python is for definition,
not configuration.

The problem with some of the high-level ZCML directives is that
they performed *definition* in addition to configuration.
For example, browser:page creates new classes.

It's important that definition be done in Python. Configuration
should be done in ZCML.

Should there be high-level directives in ZCML?  I don't think they should
be disallowed, but you really have to ask yourself if the automation they provide
is worth the extra burden of understanding what they do.

Anyway, the main thrust of the ZCML simplification is to use it just for
low-level configuration, not for definition.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the Zope3-dev mailing list