[ANN] SkunkWeb 3.0 Released!
Markus Schaber
markus at schabi.de
Tue Aug 28 16:36:42 EDT 2001
Hi,
John Goerzen <jgoerzen at complete.org> schrub:
>>> DTML bites. It hits on making it easy to do easy things, but is too
>>> constraining for the expert because you don't have the full
>>> flexibility of Python in the tags.
>>
>> DTML is presentation language. Don't mix logic and presentation.
>> If you
>> need Python - just use Python, not DTML.
>
> The problem, though, is that it's not all that easy to do HTML in
> Python, especially for non-programmers. One neat approach is Enhydra,
> a Java system, which uses id attributes in HTML tags and then lets the
> Java code modify those tags. Completely separates presentation from
> implementation. OTOH because it is Java, it apparently obeys the
> unwritten rule that it must be a beheamoth with a large and complex
> API that requires 10x more code to use than it should.... sigh....
I use DTML for the page, and python for the logic. At the top of my
page, I have the following or something alike:
<dtml-let seite=Calculate>
<dtml-with seite>
Calculate is a python procedure that calculates everything that needs
logic (e. G. a list containing all the nav-bar entries) and returns it
in a result object. Then dtml-var and dtml-in applied on the object-
defined namespace is all you need :-)
> I also dislike not storing files in the regular, filsystem way.
That's the biggest negative point, and it makes it more difficult to
create backups.
> OTOH, Zope's inheritance model is quite nice.
Yes, the most classes are easy to use as mix-in. But the documentation
is more than a mess, although its getting better.
markus
--
"The strength of the Constitution lies entirely in the determination of
each citizen to defend it. Only if every single citizen feels duty
bound to do his share in this defense are the constitutional rights
secure." -- Albert Einstein
More information about the Python-list
mailing list