[Zope-dev] To ZCML or not ;-)

Jim Fulton jim at zope.com
Thu Apr 7 10:08:17 EDT 2005


Chris Withers wrote:
> Richard Jones wrote:
> 
>> Is this a general trend for Zope 2? I'd rather see Zope 2 kinda avoid 
>> ZCML if possible. It's just one of those personal preference things, I 
>> suppose, but I know I'm not the only one who isn't that enamored of 
>> the ZCML approach. I actually like having the declarations all in the 
>> python code like it is in Zope 2.
> 
> 
> Am I right in thinking that the XML part of ZCML is layered over python 
> functionality underneath? If so, how hard would it be to provide an
> alternative to the baroque XML? - the bit of ZCML I don't like ;-)

It's is theoretically possible, but not really worth the effort.

I'll note that ZCML has gotten progressively simpler over the years.
It continues to get simpler.  For example, now that we we can say more
about adapters in Python, a typical adapter registration looks like:

   <adapter factory=".Myfactory" />

Also, for various reasons, ZCML took on implementation capabilities.
We're looking at ways to move that implementation capability
back into Python, where it belongs, which will make page definition
easier.  I expect that page definitions in the future will look more
like:

   <page name="foo.html" class=".FooView.html" permission="zope.View" />

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 Zope-Dev mailing list