[Zope3-Users] woah... zcml O.D.

Stephan Richter srichter at cosmos.phy.tufts.edu
Thu Jun 23 06:15:49 EDT 2005


On Thursday 23 June 2005 02:32, Corey wrote:
> Appologies if some of these questions seem naive, I'm just beginning to
> more thoroughly delve into zope3 - of which I've been very impressed so
> far.
>
> However - is it just me, or does zope3 seem to require a rather massive
> amount of configuration?

It is not massive. The reason that it seems massive is because a lot of the 
complexity that is usually in the Python code is moved to ZCML. Configuration 
is not an easy task.

> Is that specifically an artifact of Component Architectures in general?  Or
> is this by design?

If you want to ask this way: Any very flexible and component-oriented code 
base will have similar configuration.

> Are "site administrators" really supposed to understand all that zcml in
> the configure.zcml files, or are they more realistically the domain of
> component developers? It seems to me that the configure.zcml looks almost
> as if it would basically be considered "hands off", once the
> application/component was coded and installed.

They are not meant for site admins. And you are right, one should not modify a 
given ZCML. However, one can use overrides.zcml to override any ZCML of other 
configuration files thus enabling you to change the configuration. This would 
be only possible in Python via Monkey patching, which you will agree is a bad 
practice.

> Generally how much of any particular configure.zcml could - practically
> speaking - be modified in a usefull manner?

All of it via overrides.zcml.

> Even for relatively smallish apps, such as the buddydemo and zwiki, the
> configure.zcml file seem quite large; I hate to imagine what a more
> involved and complex app would do.

The complexity of ZCML is not that bad, if you have written the ZCML yourself. 
Just looking at it without a particular goal is usually overwhelming, but 
such is looking at stars at night, even though you can see at most 2000 at 
any given time (in a very dark area).

> Am I just looking at it wrong?  Perhaps the basic idea is small amounts of
> code, and large amounts of configuration/meta-programming via zcml?

I would rephrase that: In order to produce clean, concern- and 
function-separated Python code, you need a fairly sophisticated configuration 
language to put all the pieces together.

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-users mailing list