[Zope] Syntax: Learning from JSP's problems
Johan Carlsson
johanc@torped.se
Tue, 8 Feb 2000 20:40:32 +0100
> If you ignore everything after/including Problem #4, this paper transforms
> quite well if you just replace 'JSP' with 'DTML', 'Java' with
> 'Python', and
> 'WebMacro' with 'DTML-entity syntax' :-)
>
> &dtml-foo; (along with <dtml-let>) addresses most of the issues raised by
> the paper. The remainder already aren't *too* bad in DTML. Still, there
> are many times when I'd like to be able to do XSLT-style manipulation of
> pages rather than embedding stuff.
That's an absolutely brilliant idee!
One problem that I see with DTML is that is hard
to make complex methods in. DTML great for embedding
content in a template, thou.
Python Methods on the other hand are brilliant
for making methods/functions.
It would be nice to be able to include inline
Python Methods inside a DTML Method/Document,
either with <dtml-tags> or &dtml-entities;
It would make methods more manageable collecting
all related code.
Example:
<dtml-pymethod>
def myfunc():
return super_stylus
</dtml-pymethod>
<h1>&dtml-id;</h1>
<p style="&dtml-myfunc;">This is a super styled message!</p>
etc...
//Johan