[Grok-dev] Re: ZCML (was: 0.14 todo list)
robert at gravina.com
Thu Jul 31 02:30:08 EDT 2008
On 31/07/2008, at 3:57 PM, Jan Ulrich Hasecke wrote:
> Hi all,
> the following is no answer to Roberts statement, I am quite sure
> that he does not meant it the way I understood it. It is addressed
> to the whole Grok community.
> Am 31.07.2008 um 03:23 schrieb Robert Gravina:
>> ZCML is dead! Long live the Grok!
I do appoligize for creating a stir with this. I didn't mean that ZCML
is useless - in fact, I'm quite new to Zope3 so I shouldn't even be
making statements like this... However, I don't enjoy writing ZCML (it
does take *time* and duplicates what I've already stated in my code).
If grokkers can handle 80% of the cases where convention could be used
to register my adapters, utilities, views, templates etc. I think
that's a good thing. I'm not sure if this means that this can't be
configured by other users of the code.. is this the case?
Being able to override configuration is very powerful... perhaps I
should learn a bit more about ZCML and the motivations behind it
before declaring it dead :) I'll go dust off my copy of Weitershausen
and spend some quality time with it I think :)
I'd really like to know more, so I'll ask a few questions here :
> If you get an application from someone else, you only have to look
> into the ZCML-files and you will soon understand the architecture of
> the application. The redundancy which violates the DRY-law, seems to
> me helpful if you read the application.
Can't this be done be reading the source? If I look at interfaces.py,
I can see the interfaces, if I look at the class I can see what it
implements and adapts. With good API documentation, this is really
easy (the Twisted people use a zope.interface aware documentation
generator, have a look at their API docs. I've noticed the Grok admin
does something similar too on the fly).
> Writing ZCML sucks, but it sucks if you do it with vim, emacs or
> whatever editor you like. If we had a ZCML-aware IDE, i would be
> possible to build a valid ZCML-file with a few mouse clicks.
Although I speak from total inexpereince here, many people criticise
Java (and Java coders) for this... do we really want to rely on IDEs
like Eclipse to generate code for us, or is this effort better spent
in simplifying the process?
> If you take the ZCML-files as a blueprint of your application, it
> seems to me a clean tool to master really big an complex
> applications. I cannot foster this with my own experience, but I've
> heard people say that ZCML saved their lives.
I can believe this, but I wonder if ZopeCA-aware API docs can't help
> And from a marketing point of view these statements are really bad.
> How shall I solicit Zope, if more and more people tell me that the
> tool that hold all these components together sucks? How shall I
> convey trust to the public, if the Zope guys start to build up a new
> framework every five years?
You are right, and it was foolish of me to make them.
Having said that, I think that Grok makes rapid web development
possible in Zope 3 without skimping on quality.
> Let Grok smash ZCML, it is nice to have more than one way to build
> web applications, but don't curse ZCML.
Indeed it is - but let's not have too many ways to do the same thing.
(This is slightly offtopic but...) I'm developing in Plone right now,
and I would prefer if there wasn't a Zope2 *and* a Zope3 way of doing
just about everything. It's a real issue for me because it's very very
hard to convince other programmers working alongside me, who are
productive in doing things one way, to switch to another way
regardless of the technical superiority or elegance of the Zope3
More information about the Grok-dev