[Zope3-dev] ZCML alternative

Casey Duncan casey@zope.com
03 Jun 2002 11:00:51 -0400


On Mon, 2002-06-03 at 08:22, Philipp von Weitershausen wrote:
[snip]
> 
> Also, I don't agree with you in that a site administrator who doesn't 
> know Python also doesn't know XML. XML as a universal data format (not a 
> language, obviously) should not only be known my all people who deal 
> with web servers but I think it already *is* well-known among them. If 
> not, it doesn't take all that much time to learn it.
> 
> Python, on the other hand, does a lot more than just data description. 
> As a programming language, it relies on syntax, code blocks etc. etc. 
> This would make it more likely for people to make mistakes when they 
> don't know Python.
> 
> Phil

XML in one point of view is a level of abstraction from plain text. I
think this increases the "guessability" of the intended meaning since
presumable more people can read XML than Python.

However, reading something and understanding it are two entirely
different things.

ZCML IMO opinion is like a "buffer zone" between developers and site
admins. This is at once its most powerful and frustrating feature. It is
designed so that site admins need to know less (or even nothing) about
the code. Unfortunately it also means, I, as a developer are burdened
with learning, understanding and maintaining code in an entirely
separate configuration glue language.

As a developer, my development obligation includes all of the following
things in Zope 3:

Creating Interfaces
Creating tests
Creating component classes
Creating views
Creating ZCML Configuration
Creating Prose Documentation (Don't laugh)

These things require me to know at least three languages (Python,
ZPT/HTML and XML/ZCML). And unfortunately writing Interfaces, tests,
component classes and view glue (vlue?) take quite different mindsets
and knowledge, even though they are all in Python.

Now we throw ZCML into the mix. This is currently the part I dread, even
though you never write much of it. Just because it is so different from
the rest.

Now I think we can all agree that Zope 3 is more modular and potentially
more complex then Zope 2 as a whole. Zope 2 as we know suffers from the
"have to know too much at once" development syndrome. So our task is to
at once make Zope 3 more capable, more explicit and yet again easier to
learn and develop iteratively.

You can make an argument that all of this is true. But at the end of the
day, will a developer actually understand the whole of what they have
built? How about a month later? We probably can't answer that, but its
worth thinking about.

-Casey