[Zope3-Users] Re: ZCML, practicality, purity (was "Excellent
jmo at ita.chalmers.se
Thu Dec 22 11:04:38 EST 2005
Shane Hathaway wrote:
> Wade Leftwich wrote:
>> If ZCML (a/k/a The Right Way) is keeping fairly smart developers from
>> trying Z3, then maybe we need an alternative (a/k/a What People Think
>> They Want).
> Are you sure ZCML is The Right Way? I know its purpose (since I
> helped invent Zope 3): to combine configurations by multiple
> developers without imposing a particular workflow. However, I
> maintain that Python code could do the job better. The Python code I
> have in mind is not the same as Jeffrey's examples. I'll elaborate if
> there's interest.
>> Would it make sense to publish a recommended way to configure Z3 apps
>> completely via Python? Just for people who can't get past ZCML?
> Well, I wouldn't say the people I know "can't get past" ZCML. They're
> smart, and learning an XML schema is not a big effort. However, for
> someone coming from Java frameworks, yet another XML format is a big
> mark against Zope, making RoR and other frameworks much more
> attractive. It's also a mark against Python, since it seems to
> indicate that Python is too weak to implement a configuration
The problem with ZCML is not the language (XML). Writing the same
description in python would not address such issues as:
- when looking at a component, how can I know how it is wired inside the
application without doing a grep on 100 files?
- when looking at the wires, how do I quickly get access to the
components that they connect together?
This is all I need in order to understand how an application is built.
If it was easier to navigate between the components by following the
wires, there wouldn't be such an issue with ZCML I think. Maybe a GUI,
or IDE would help a lot.
It could also be that ZCML is cluttered with too much information that
really doesn't belong there.
For instance ZCML should not be used for the application setup (for
creating menus, actions, workflows, etc.) because this has nothing to do
with connecting components. This could be done in python or be stored in
archives in XML (.tgz, .zip, ..).
More information about the Zope3-users