[Web-SIG] Re: Just lost another one to Rails
Martijn Faassen
faassen at infrae.com
Wed Apr 13 15:05:18 CEST 2005
Bill Janssen wrote:
>>The minimal Zope 3 code is a page template and a few lines of ZCML in a
>>Python package with an empty __init__.py to hook up a new view to an
>>existing object (say, a folder). There's no Python code *at all*
>
>
>>From my point of view, that's the problem. I don't want to write in
> some cumbersome and buggy XML format (which is what I'm guessing ZCML
> is) when I could be writing clean Python code.
Buggy? I don't think ZCML is buggy. Where's that coming from?
For some tasks Python is *not* the ideal language. I've seen the way we
glue up components in Zope 2; either stuff is stored in inaccessible
ZODB based databases configured through a lot of bad web user
interfaces, or you see a lot of grotty Python code which hacks together
component configuration. A domain specific language which does this and
only this is a massive improvement. Just the ability to *think* about
this problem separately helps. We *weren't* writing clean Python code.
I've seen this problem occur over and over in Zope 2 projects.
I see this attitude towards domain specific languages all across the
python world. People don't like XML document formats either, as they can
just use clean, simple, Python datastructures. And lose
interoperability, accessibility by a host of programmers that *don't*
know your codebase, and code yourself onto an island.
In the mean time, in the world of HTML templating, we see a lot more
agreement that sometimes a domain specific language is useful. People
generally don't want to be producing all their HTML from Python
functions. I've seen far less complaints about ZPT being cumbersome and
buggy.
Possibly there are alternatives to a separate domain specific language
in Python that are still clean and maintainable. Can you give me an
example of a community of Python developers that has been doing this
successfully?
That's not say ZCML as it stands doesn't have some didactic/learning
curve issues. But to reject this out of hand just like that is a bit too
easy, I think.
Regards,
Martijn
More information about the Web-SIG
mailing list