[Zope3-dev] Number of languages in Zope 3

Joachim Werner joe@iuveno.de
Tue, 08 Apr 2003 15:14:05 +0200


Just my 2 eurocents on the languages issue:

I don't see too much of a problem in having ZConfig and ZCML as
configuration languages. Most of what these languages do can be
automated in install scripts (or full-fledged installer tools), managed
via a web frontend etc. if you really need this for unskilled end users.
Look at Apache and the tools that exist to manage an Apache server
without having to touch the http.conf.

The problems I see are in the domain of the template designers and
application developers.

Judging from current Zope with DTML and ZPT + Python, we currently have
a mess of different and hard-to-understand syntax options. That's where
Zope 3 should be less confusing.

My opinon is that the best way to go would be using real Python
expression syntax wherever an expression is used. Currently there are so
many different "shorthand" versions that might be easier to use for some
very limited scenarios but become more and more confusing as soon as you
really need the "real thing".

E.g. there is

<dtml-var title_or_id> (calling a method without seeing that it actually
is a method)

<dtml-var "title_or_id()">, which is almost Python, but uses an implicit
  context (i.e. it's not "self.title_or_id()")

and in ZPT:

string:blabla/${here/title}"

python:'blabla' + here.title

etc.

The main problems are that we switch between explicitly calling methods
and handling them as attributes and between "." and "/" delimiters
almost randomly.

ZPT add another layer of complexity in that they don't have the if/else
and in-blocks that make DTML so easy to use (and relatively hard to
read, but ZPT aren't easier to read).
I see that the way ZPT handle conditions is probably the only way of
doing it and at the same time preserving HTML/XML integrity. But it
still is very cumbersome.

A quick fix for the first part of the problem would be to always
encourage the use of real Python expressions. They might be harder to
learn in the first place, but later, when people advance into coding
their own Python Scripts or even new components they will already be
familiar with the syntax.

The second (ZPT-specific) problem is hard to solve. One way I see is
that somebody starts working on an IDE-style frontend (or a plugin for
an existing IDE or editor) that assists in creating correct
ZPT/Scripts(Python).

Being able to choose the available API calls from dropdowns, getting
help on the available parameters and stuff like that would make the
whole task a bit easier.

Joachim

-- 

iuveno AG

Joachim Werner

_________________

Wittelsbacherstr. 23b
90475 Nürnberg

joachim.werner@iuveno.de
www.iuveno.de

Tel.: +49 (0) 911/ 9 88 39 84