[Zope] DTML vs ZTP

Tino Wildenhain tino at wildenhain.de
Mon Dec 13 06:33:06 EST 2004


On Mon, 2004-12-13 at 11:15 +0100, Johan Carlsson wrote:
> Tino Wildenhain wrote:
> > 
> > Well, this is because Plone is a very bad example of ZPT use.
> > Still you can abuse ZPT - while you can somewhat cleanly use
> > DTML - either case you need a sophisticated API to your application
> > and dont write code in the presentation layer. 
> > If you are so far, you see its a bit more convient to use ZPT
> > then to worry about where the h*** some variable got aquired.
> > 
> > <dtml-in linklist>
> > <a href="<dtml-var url>"> ... </a> 
> > </dtml-in>
> > 
> > (whats url? attribute? object? loop variable? request variable? Cookie?)
> > 
> > <a tal:repeat="link here/linklist" tal:attributes="href link/url"> ...
> > </a>
> > 
> > Well, for me, the latter looks more understandable.
> 
> I agree that the implicit acquisition of variables is
> an ugly thing, but in practis I never had any problems
> with it.

I know DTML. And therefore you must lie or dont do much with Zope :-)

> I don't agree on the later TAL exempel looking more understandable
> than the DTML. To me the DTML looks more like programming code
> which is something that I find easier to understand and read.
> 
> But I also understand that this is a matter of coding style and
> taste. There is simply not a question of what's right or wrong.
> (So IMHO there's no point in turning this in to a religious issue ;-)
> 
> The problem for me is that Zope developement lately has
> only been focused on TAL. That's why I fell that I need to
> raise my voise in favor for DTML, which after alote of
> of fighting with TAL and METAL is my choise.
> 
> In my role as an consultant I have found that I do profit
> more from using DTML than TAL. That's also partly because
> I use Easy Publisher, which was designed with DTML as primary
> markup language.

Well, this explains a lot. I once saw the code of EP and... 

I guess everybody has own ideas on how code must work and
look like :-)

Regards
Tino



More information about the Zope mailing list