[Zope-dev] Using DTML is too difficult (was: [Zope] DTML Syntax contd. + rant)

Rik Hoekstra hoekstra@fsw.LeidenUniv.nl
Wed, 10 Nov 1999 16:46:13 +0100


<snip>
Martijn,

I _really_ like Zope, but I am afraid I have to agree with you. I'll add
some more rant. I believe it's important to stress that this is _not_ meant
as criticism per se, but only to point out what even for people who have
used ZOpe for almost a year are major flaws in its usability. And I can vote
for Martijn, that he's not stupid; I myself have the excuse of not coming
from a computer science background, but still I rabble on.

> Philosophical end rant:
>
> If I ever get the time I'd be tempted to work on a DTML 'cleanup'
> project. DTML is currently *far* too much like Perl and not enough like
> Python. *some* easy things are very easy, but as a consequence some
> other easy things become far too hard, or at least look far too
> complicated. You can spell the same thing in too many ways. The
> community encourages and praises additions for convenience (like the
> 'default' option, or the new extended &entity; syntax) but as a result
> DTML loses its conceptual integrity. It becomes too big and not easy to
> understand.
>
> I understand the argument that DTML shouldn't be used for complicated
> purposes, and that you should use Python. This is fine and good, but in
> practice people *do* use DTML for complicated purposes. ZClasses in fact
> encourage this.

The point is that it's not always clear when things are complicated. And
using python for complicated tasks is not exactly a piece of cake either,
for a number of reasons.
- writing products in python is complicated and mostly not worth it
- writing python base classes for ZClasses is easier, but using them in the
Z framework requires  quite a bit of understanding of ZClasses and the Zope
framework in general
- External methods are much easier, but they have their own disadvantages:
     (1) it is less than obvious how they interact with the dtml
methods/namespace they are called from
     (2) they are not easily transported to another machine, because you
need physical access to the
         filesystem for that (I understand that that's the only way)

>
> DTML should be more like Python.

Yes

> Luckily the Zope framework does allow
> new objects to be plugged in using something else than DTML, so not all
> hope is lost. :)

But it should be easier to use this stuff (do I hear the word developer
documentation??? uuummm)

>
> Feedback on this rant would be appreciated.


My 2 cents.

Rik