[Zope3-dev] Re: More thoughts on packaging

Stephan Richter srichter at cosmos.phy.tufts.edu
Fri Feb 20 07:19:54 EST 2004


On Friday 20 February 2004 06:27, Martijn Faassen wrote:
> I know though that this discussion won't convince anybody; XML isn't
> very well liked in the Python community. :)

I am personally not a big fan of XML either, but I like it for exactely the 
purposes we use it in ZCML (and for remote communication, like XML-RPC). I do 
not think that some other declarative language will do much better.

ZCML:

<adapter
    for="zope.app.messageboard.interfaces.IMessage"
    provides="zope.app.messageboard.interfaces.IMailSubscription"
    class="zope.app.messageboard.message.MailSubscription" 
    />

INI/ZConfig-like:

[adapter]
    for=zope.app.messageboard.interfaces.IMessage
    provides=zope.app.messageboard.interfaces.IMailSubscription
    class=zope.app.messageboard.message.MailSubscription
\required empty line

Now, I have no clue why people would think the latter is less verbose. The 
same amount of lines and the latter is only shorter by the quotation marks 
and one forward slash. This makes it worth using XML and all the advantages 
Martijn listed.

I have said this many times before: I think that the issue is not ZCML itself, 
but the task it tries to accomplish is not an easy one and requires a lot of 
information. I think that there is nothing verbose about ZCML; we do not even 
use XML elements extensively, but place everything in attributes, which is, 
if I remember correctly from Martijns previous mails, not very XMLish 
anyways. And honestly, when reading an Apache configuration file I am always 
overwhelmed, and that has nothing to do with the way it is written. I imagine 
that newbies feel the same way coming to Zope 3. But in the end, ZCML is 
really your friend. It tells you quickly how the system hangs together and 
can be used. I think it is just something that people will need to learn.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training



More information about the Zope3-dev mailing list