[Zope3-dev] Learning ZCML

Stephan Richter stephan.richter@tufts.edu
Mon, 31 Mar 2003 09:02:27 -0500


On Friday 28 March 2003 07:53, guttner@fit.vutbr.cz wrote:
> From my perspective of a programmer/explorer who's digging deeper into
> Zope3 and trying to discover how it works and how to use it or extend it,
> ZCML seems to be pretty poorly documented. I was trying to find a document
> about it that would contain either a reference or a tutorial-style thing
> but I failed miserably. The one document I found is more like a
> one-sentence explanation for the tags, which doesn't quite seem enough.

Huh? How long have you looked around? I think ZCML is nicely documented at 
this stage of Zope 3:

1. The Programmers Tutorial shows nicely how to use ZCML for simple Content 
objects: 
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/ProgrammerTutorial

2. *All* of the ZCML directives are documented here:
http://cvs.zope.org/~checkout~/Zope3/doc/zcml/namespaces.zope.org/

3. There is a structured text file describing the meta language:
http://cvs.zope.org/~checkout~/Zope3/doc/zcml/meta.stx?rev=HEAD&content-type=text/plain

4. An introduction to ZCML (outline still):
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/ZCMLIntroduction

5. Early outline to write your own ZCML directive:
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/NewZCMLDirectives

I think that ZCML is one of the best-documented features in Zope 3.

> Is there a piece of documentation I missed? 

Yes, a lot. See above.

> I think that  for
> programers/developers, learning ZCML is really important. Most programmers
> can learn Python in three days and TAL is also pretty simple since there
> are similar things elsewhere. But ZCML is connected to the new style of
> component architecture and its role is tightly connected with the new
> architecture.

Sure, but I think that with ZCML it is much easier to understand the component 
architecture, since the components are often standalone objects that do not 
tell you much about the inner-workings of the system. ZCML reads (in my 
opinion) almost like English, so it makes it really easy to understand whats 
going on.

> For a programmer, I think that learning ZCML is the hardest part of Zope3,
> and since Zope3 is interesting mainly for programmers at this point, it
> would make sense to support good ZCML documentation.

I think ZCML makes Zope 3 easier to understand, since many people are not 
familiar with Component Architectures. It is true that it is one of the most 
important components, therefore it has already so many docs.

> What do you think?

I think ZCML make things easier and is well documented for the current stage 
of Zope 3.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training