[Zope-dev] Re: [Zope] DTML Syntax contd. + rant

Martijn Faassen m.faassen@vet.uu.nl
Thu, 11 Nov 1999 16:13:53 +0100


Evan Gibson wrote:
> 
> On Wed, Nov 10, 1999 at 07:43:44PM -0500, Christopher Petrilli wrote:
> > On 11/10/99 7:11 PM, Stuart 'Zen' Bishop at zen@cs.rmit.edu.au wrote:
> > > I'm with you 100%. It makes me feel like I'm programming a reverse polish
> > > calculator sometimes :-)
> >
> > It is sub-optimal, but it is not a programming language, so please don't try
> > and hold it to those standards.  DTML is a reporting language, and trying to
> > make it do things it isn't designed to is simply going to further complicate
> > the matter.  Things like 'dtml-let' are dangerous in this reguard... they
> > make you think you actually have a language worth doing anything beyond
> > reporting in.
> 
> We've been talking about this around work and have pretty much agreed that
> DTML lets you do too much... It _lets_ you use it as a programming
> language, when what we should really be doing is restricting dtml to
> reporting stuff, make Python methods an intrinsic part of Zope and
> _require_ people to use python to do the really nasty stuff.

Ah, I said almost exactly the same in another post I just sent. :) Using
Python or something else non-DTML should be obvious and natural and
easy, whenever you reach the limits of DTML. And it should be easy to
know that you have reached those limits.

> DTML is _perfect_ as a reporting language and should always provide the
> front end to objects, but the objects themselves should be either database
> queries or python code.

Agreed.

> Initially we did things in DTML because it was easier than writing external
> methods, but if you can write python methods inside Zope and cut out a lot
> of the dangerous namespace games in DTML (like _, dtml-let, REQUEST.set)
> then you _force_ the divorce between functionality and display, get DTML
> looking elegant again [snip]

Yes.. Though it probably takes a bit of thought figuring out how to make
this natural and easy. Hm. Throwing out the _ namespace for instance
might induce people to do something else that's horrible instead, if
care isn't taken.
 
[snip discussion on how to adapt DTML, and other discussions about ZSQL
methods]

Regards,

Martijn