[Zope3-dev] Re: ZCML

Shane Hathaway shane at zope.com
Mon Aug 18 18:37:20 EDT 2003


Stephan Richter wrote:
> On Monday 18 August 2003 16:29, Shane Hathaway wrote:
> 
>>I understand, though I think it's unfortunate.  I find it quite
>>difficult to read or write ZCML, and as a result, I haven't worked on
>>Zope 3 for a long time.
> 
> 
> I find ZCML really easy to read and write. I have usually no troubles finding 
> anything or adding something.

You've spent a lot of time on it.

> From your previous comments I gathered that you simply take a different 
> approach and I agree with some others that I do not like it that much. I 
> prefer attributes instead of tag elements.

Why?  Note that I'm not saying that all attributes should be elements, 
but that attributes should be regarded as a *shortcut*, which is how the 
W3C sees it too.  As soon as some piece of the configuration becomes 
more complex than a textual string, it should be represented as a child 
element.  XML's rules intentionally steer you in that direction.

> Note also that ZCML is extremly modular at this stage. You simply define a 
> schema that describes your directive and then make a meta directive 
> implementing the directive. It is super easy and really nice. 

That is not modularity, that's extensibility.  Modularity is about 
building large things out of small things.  Extensibility is about 
building many things.  Both concepts are important.

Now, I take back the suggestion that we use "src" attributes everywhere; 
I just looked at some configuration files and I see that would be heavy. 
  The suggestion for "text" attributes stands, though.

Shane




More information about the Zope3-dev mailing list