[Zope] a metric for killing DTML.

Jens Vagelpohl jens@zope.com
Thu, 1 Nov 2001 07:39:23 -0500


i usually consider anything in DTML that does not render a page but acts 
as some kind of intermediate (like form handlers etc) to be prime 
candidates for converting to python scripts.

as far as the "REQUEST.set-sledgehammer" goes, most of its uses can be 
replaced by dtml-let, which has the added advantage that you can look at 
the code and see where a variable came from much faster than scanning all 
code for REQUEST.set. maybe it's just me, but i consider REQUEST.set bad 
style that should be used only if nothing else works.

jens


On Thursday, November 1, 2001, at 02:13 , Anthony Baxter wrote:

> Like any site that's been around for a while, we've got a lot of
> DTML that shouldn't be DTML. We're gradually killing it, but
> we're looking at detecting stuff that _shouldn't_ be in DTML.
> One metric that's come up is "any DTML method that has 3 or more
> calls to REQUEST.set() is probably up to no good."
>
> Have other people found other useful rules of thumb about when
> to avoid DTML?
>
> Anthony