[Zope3-dev] ZCML alternative

Barry A. Warsaw barry@zope.com
Sun, 2 Jun 2002 23:11:34 -0400


I'd guess one other advantage of zcml is that if you can define your
dtd well enough, you can actually use better tools than text editors
to configure your Zope installation.  I don't know what the state of
the art in xml editors is, but I xml is probably largely like html --
you really don't want to hand edit it if you can help it (present
company excepted :).  As zcml gets more refined, I think we need to
spend some effort on documentation and dtd definition.

Another advantage of zcml is that it's probably better for mechanical
interpretation and generation by programs than Python code is.  Say
you wanted to suddenly add the Foo permission to all Bar views.  It's
probably going to be easier to write a script to churn through your
zcml than to churn through a bunch of Python code.

That said, it might also be worthwhile to map zcml into an internal
object model or intermediate representation.  That way for folks who
are more comfortable slinging Python than xml, they can write Python
code like what Shane described.

-Barry