On Monday 20 March 2006 13:29, Roger Ineichen wrote:
> Hi Stephan,
>
> > On Monday 20 March 2006 13:50, Tres Seaver wrote:
> >> So *don't use ZCML*; use Python: there is literally nothing which can
> >> be done in ZCML which cannot be done in Python. I wish that folks who
> >> don't like / need ZCML would quit trying to dictate how the rest of us
> >> use ZCML.
> >
> > I agree with this sentiment. I really hate where ZCML is going. I tend
> > to like ZCML as an overview for the functionality of a package, so the
> > already simplified versions of the adapter and utility directive make
> > ZCML much less useful to me. And Philipp's quest to effectively removing
> > all nested directives disturbs me even more. I like the nesting; it
> > groups common things together and saves some typing. I also tend to like
> > writing new ZCML directives; it's easy.
>
> It's time to me for writing a statement about this before I start going
> a own way.
>
> After 3 years of daily development with Zope3, I'm sure the hardest part
> in Zope3 is to get a big picture from a application. A simplfication in
> ZCML and loose the informative character is really contra productive for
> this.
>
> This means to me that it becomes harder to read and understand the
> application at all. Of corse each single component and it's
> reagistration will be simpler with the new simplification, but that's
> not truh for the concept at all if this will end in 10 interface, 5
> adapter and 3 utility registrations!
>
> After reflect the simplification in some of our applications the ZCML
> looks like a big group of pinguin. Each of them look exactly the same,
> no visual sugar in it ;-)
>
> I don't like to go in the following direction with ZCML:
>
> <interface
> interface="open.this.package.for.more.IInformation"
> type="perhaps.I.m.a.skin.or.something.IElse"
> />
>
> and
>
> <adapter
> factory="nobody.knows.what.this.means.in.less.then.two.second"
> />
>
> or
>
> <utility
> factory="i.m.the.magic.Pure"
> />
>
> For me it's defently easier to understand and get the big picture of a
> application if we have ZCML directives like:
>
> <mail:smtpMailer
> name="192.168.0.1-smtp"
> hostname="192.168.0.1"
> port="25"
> />
>
> then
>
> <utility
> factory="for.configuration.info.see.in.Mailer"
> />
>
> The situation right now is so ugly for me that I think we should add
> back the higher level ZCML directives again. Probably we should do that
> in a new "higher level" namespae so everyone could decide which concept
> he likes to use.
>
> Is somebody interested to work on a higher level ZCML directive
> namespace and help to support them?
>
> My Fazit is;
>
> It's important to have informative sugger in a configuration language
> like ZCML. Otherwise it get reduced to somewhat useless that I will hate
> to write but have to. The next step will probably be to move the
> configuration to pyhton at all. And then we really lose the component
> aspect and get back hardcoded concepts where everybody has to copy/past
> and customize. That's not the way I will go in the future!
>
> What do you think? Are I'm wrong?

Advertising

Count me in on the "it's really nice when ZCML can provide a high-level
overview of a package's structure" train. It seems to me that "verbose"
ZCML declarations are an incredibly compact way of providing this sort of
valuable information.
Of course I'm not too fond of some overly-magical directives either, and I'd
love to have a top-level <implements /> (perhaps in addition to the class
level one, it's not as if there aren't other duplicate directives of this
sort).
Alec Mitchell
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com