[Zope] DTML vs ZTP

Johan Carlsson johanc at easypublisher.com
Mon Dec 13 05:15:04 EST 2004


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 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.


-- 
Johan Carlsson          Tel: + 46 8 31 24 94
Colliberty              Mob: + 46 70 558 25 24
Torsgatan 72            Email: johanc at easypublisher.com
SE-113 37 STOCKHOLM


More information about the Zope mailing list