[Zope] why DTML confusing

Spicklemire, Jerry Jerry.Spicklemire@IFLYATA.COM
Fri, 10 Nov 2000 15:36:52 -0500


Irene says:

> I get so frustrated with DTML, I want to scream.  
> Please don't tell me to buy the Zope book, 
> DTML should be more intuitive.  
> DTML maybe the heart of Zope, 
> but it's also it's achilles heel.

You're right about the confusion, frustration, nor are you alone. 
Still, DTML isn't the heart of Zope, it's more like the fascia. 
DTML was intended to make the task of delivering dynamic content 
wrapped up in HTML-ish Templates easier. It evolved, and took on 
a broader scope that made it enticing for lot's of "other stuff". 

Like most evolution, there are obvious benefits, and some 
unfavorable outcomes. The most glaring problems show up when 
you start trying to do things that seem to be just a step or 
two more sophisticated than simple examples that "just work". 

There's good news. Python Methods, or whatever we end up calling 
them, make actually implementing such things as easy as Py(thon). 
For some folks, it may look like the bad news is, "Now I have to 
learn Python". In perspective, learning Python is way better than 
wading through the Zope API via DTML. Way way better. 

So, the moral is, keep the DTML as simple as it can be. For 
anything else, reach for another tool. Zope has bunches of them.

BTW, the <dtml-if "_['sequence-item'}"> stuff is the tip of the 
DTML Complexity Iceberg. The sooner you get comfortable with 
Python Methods, ZClasses, etc., the happier you'll be.

One last point. Python Methods (a.k.a. Restricted, Internal, or 
some other as yet unheard of alternative, which we are all 
anxiously awaiting) is an add-on at this point. Target date 
for inclusion as part of the standard "Core Zope" is Zope v.2.3.

For now, see: http://www.zope.org/Members/4am/PythonMethod
 
Later,
Jerry S.