[Zope3-dev] Axe DTML Document

Casey Duncan c.duncan@nlada.org
Tue, 18 Dec 2001 08:54:05 -0500


This is another one of those "though of it while brushing my teeth[tm]" 
things...

Zope 3 will be de-emphasizing the role of DTML. And will in fact discourage 
it's ubiquitous usage, providing the obvious advantages of ZPT and Py scripts 
in its place. Zope 3 will in fact not even have DTML capabilities until 
later in the development cycle as I understand it.

One of the main stumbling blocks conceptually to newbies is understanding the 
subtleties of DTML Documents vs. DTML Methods. Now, having done a fair bit of 
Zope training, I can just tell you how the eyes glaze over and the heads nod 
involuntarily when I reach this discussion in a class.

So, in the Zope 3 world, do we really need two DTML object types anymore? I 
think the answer is no. So, which one do you get rid of?

Well I think DTML Document is the more troublesome and more specialized of 
the two. It encourages some behavior that I think we all want to avoid: the 
mixing of content, presentation and logic all in one. It is also less 
versatile since it cannot be used as a general method of other objects.

So, that leaves us with DTML method, which I would argue is the bare essense 
of the needed functionality. Granted you could use it for evil as well, but I 
think it is less prone to that. Now, I might also suggest that the name "DTML 
Method" suggests usage beyond what we now consider prudent. I might suggest a 
consideration of changing the name to "DTML Template". I know this 
complicates backward compatibility a good bit, but I think that can be 
accommodated other ways.

So, what about those die-hard stalwart "I want my DTML Document" partisans? 
Well I propose that it would be fairly trivial to provide a product which 
resurrects the DTML Documents for those of us who cannot live without it or 
have tons of existing content stored in them. It could also return "DTML 
Method" to its former meta type for backward compatibility.

/---------------------------------------------------\
  Casey Duncan, Sr. Web Developer
  National Legal Aid and Defender Association
  c.duncan@nlada.org
\---------------------------------------------------/