[Zope3-dev] Re: More thoughts on packaging

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


On Friday 20 February 2004 07:37, Andreas Jung wrote:
> The INI file is not less verbose...The point is that it contains three
> times the same prefix which is hard to read and write. Make it shorter e.g.
> like:
>
> [adapter]
>      prefix=zope.app.messageboard
>      for=interfaces.IMessage
>      provides=interfaces.IMailSubscription
>     class=message.MailSubscription
>
> At least this is much more eye-friendly. Try to find a solution to avoid
> redundancy. Zope3 contains lots of configuration file and properly
> lot of redundant strings that can be avoided somehow.  I don't know
> very much about the impacts of the shorter notation but the information
> represented in a configfile should be easy to read.

Well, this was an example. ZCML does actually better than that even. If the 
Adapter registration is inside the zope.app.messageboard package (which it 
would be, then you have only

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

Also, the problem you point out is not XML-specific. I would also like to know 
places where we have unnecessary redundancy (preferably file and line). (Note 
that many people choose to use the full Python path, but they do not have 
to.)

BTW, there is currently a lot of redundancy, since interfaces and browser code 
do not live in the same package as the code. Once we implement the new 
structure, a lot (I think 90-95%) of the full Python paths in ZCML will/can 
go away.

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