[Zope3-dev] Re: More thoughts on packaging

Martijn Faassen faassen at infrae.com
Fri Feb 20 06:27:23 EST 2004


Andreas Jung wrote:

>> Yes, but I talk to more and more Zope2 veterans about Zope3 and ZCML 
>> and they are quite sceptical. Thus, the amount of ZCML scepticism is 
>> increasing proportionally to the number of people learning about 
>> Zope3 :)
>>
> Talking as a Z2 veteran: I agree with Philipp. Reading and writing 
> ZCML is not very much convinient. Computers are designed to read and 
> write XML but not humans. ZCML is too verbose and it is hard get see 
> at one glance what's inside a configuration file..it's too verbose.
>
Actually, XML *was* designed for human readability; that's the vaunted 
benefit of it over binary formats. XML is of course a compromise between 
computer-readability and human-readability. One can argue how good this 
compromise really was; some people like it better than others. And 
arguably XML is not very human *writable*.

Anyway, my point elsewhere in the thread is that if someone wants a more 
compact syntax/semantics, that means that some language design needs to 
take place, ideally by the people who are feeling the need. :).

Unless you want Python, in which case I disagree with you -- a 
declarative language is good and switching to Python would make things 
worse. I think the current example of distutils setup.py being Python 
and making essential information inaccessible programmatically is a good 
example of what can go wrong with this. Of course it's *possible* to 
write a Python-based system that's declarative, but it's not going to be 
automatic.

I also agree that ZCML could become more human readable and writeable. I 
spent some time some months ago coming up with a Relax NG schema in an 
analysis of ZCML. I had the hope I'd get some inspiration for a compact 
syntax, or at least a less attribute-intensive XML, but so far nothing 
has happened there yet. :)

So, if you're starting a project to improve ZCML, let me know.

In the mean time, let me try to make sure to remind you all we got some 
benefits by using XML, though:

  * at least superficially familiar syntax to most people.

  * encourages us to think in declarative terms.

  * unicode out of the box.

  * namespaces for extensibility out of the box.

  * easy to write parsers and generators.

  * since it's XML, other tools easily applicable; Relax NG schema 
definition language. nxml mode for emacs, etc.

  *  we didn't reinvent the wheel and came up with our own (grotty) 
syntax right away.

  * since we have a fairly formally defined declarative system, we can 
fairly easily transform any new compact syntax to ZCML and back again. 
We can therefore gracefully migrate if we come up with a new, better system.

I know though that this discussion won't convince anybody; XML isn't 
very well liked in the Python community. :)

Regards,

Martijn




More information about the Zope3-dev mailing list