[Zope3-dev] what is ZCML?

Shane Hathaway shane at hathawaymix.org
Mon Mar 13 18:14:08 EST 2006


Jeff Shell wrote:
> Why design a language at all?

We already did, and it's a BASIC-like language, so now we reap the 
consequences.  Some of the consequences are:

1. If you stick to the established directives, you express repetitive, 
low level information that really needs to be represented in a higher 
level way.

2. If you invent your own directives, you make it harder for people to 
figure out what low level configuration is occurring.

I see two ways to fix this situation:

1. Write tools for inspecting and searching low level configuration.  If 
the tools are good enough, we can feel free to write any directives we like.

2. Drop ZCML and configure in Python.

Solution #2 is not the subject of this thread, so let's not discuss it 
here.  Yes, I know it's already possible, but it's against the Zope 
convention, and convention is important.

> Let Python be the language. Let ZCML exist to
> do the final step of loading/registering registerable objects in a
> predictable manner, and to provide the few things that we don't want
> to pollute our (or others) Python code with, like security
> declarations.

You're aware of the DRY principle, right?  ZCML is repetitive, and 
repetitive is wrong.  The primary solution to repetitive code is to move 
to a higher level of expression.

Shane


More information about the Zope3-dev mailing list