[Zope] Isn't DTML more like what other frameworks do?

Paul Winkler pw_lists at slinkp.com
Tue Jan 9 16:10:42 EST 2007


On Tue, Jan 09, 2007 at 08:31:29PM +0100, Maciej Wisniowski wrote:
> > As for me, I am lazy. ZPT does things in a way that few other frameworks do,
> > although Ruby's Amrita2 sort of resembles ZPT.

Not really. It's more closely related to the Meld family (pymeld,
pymeldlite, meld3), and to XMLC.

> > Displaying phantom  text in a static page  which will
> > not be there dynamically is not superior to DTML.
> > It is just more confusing. I have never learned ZPT
> > well and I may never do so.
>
> There is also Twiddler from Simplistix. It is something
> pretty new and interesting. It claims that there is no
> need to learn new templating language.

Twiddler also looks very similar to the Meld family.  Looks nice, but
I haven't had time to get a sense of what distinguishes it from meld3.

> I'm not using dtml, only if I have to modify existing code,
> but it is painful. Often I don't know what happens and where
> from are all these variables :)
> Other thing is, that AFAIR dtml is faster than ZPT.

My feeling about the DTML-vs-ZPT debate is that it can basically be
reduced to the following chart:


FEATURE             | DTML      |  ZPT 	      |
--------------------+-----------+-------------+
potential for	    |  	       	| 	      |
confusion due to    | Lots  	| A little    |
implicit magic?	    |	       	|      	      |
--------------------+-----------+-------------|
"familiar" syntax?  | Yes      	| No	      |
--------------------+-----------+-------------|
round-trip with	    | Hell no  	| Maybe, with |
an HTML designer?   |		| some pain   |
--------------------+-----------+-------------|
Useful for     	    | Yes      	| Not really  |
non-X(HT)ML?	    |		|   	      |
--------------------+-----------+-------------|
Prevents invalid    | No       	| Yes	      |
markup?		    |		|    	      |
--------------------+-----------+-------------+


So, you have to ask yourself which of the above you care about for the
projects you work on. With Zope, I am typically doing HTML or XML,
usually with somebody else doing the design. For me, ZPT has nice
advantages.

OTOH, sometimes we're doing ZSQL so we use DTML syntax for that.  ZPT
would be useless for building SQL queries.

--

Paul Winkler
http://www.slinkp.com


More information about the Zope mailing list