See http://www-106.ibm.com/developerworks/java/library/j-jstl0211.html Admittedly, they were a bit cleverer about namespace, expression vs. name, and tag-nesting issues, but otherwise it's all very familiar. Compare: <c:choose><c:when test="${user.role == 'member'}"> <p>Welcome, member!</p> </c:when><c:otherwise> <p>Welcome, guest!</p> </c:otherwise></c:choose> <dtml-if "user.role == 'member'"> <p>Welcome, member!</p> <dtml-else> <p>Welcome, guest!</p> </dtml-if> Cheers, Evan @ 4-am
Evan Simpson wrote:
See http://www-106.ibm.com/developerworks/java/library/j-jstl0211.html
Admittedly, they were a bit cleverer about namespace, expression vs. name, and tag-nesting issues, but otherwise it's all very familiar. Compare:
<c:choose><c:when test="${user.role == 'member'}"> <p>Welcome, member!</p> </c:when><c:otherwise> <p>Welcome, guest!</p> </c:otherwise></c:choose>
<dtml-if "user.role == 'member'"> <p>Welcome, member!</p> <dtml-else> <p>Welcome, guest!</p> </dtml-if>
Cheers,
Evan @ 4-am
Maybe you should write the inventor of this very complicated way of doing scripting and say "Hey, we tried that. It's a bad idea." :) He should use TAL instead, of course. No kidding this time. :) It's much more suited for what he wants to do.
Maybe you should write the inventor of this very complicated way of doing scripting and say "Hey, we tried that. It's a bad idea." :)
Yes, for many applications. For many others DTML is a strong language that will do the job that page templates couldn't. So my humble recommendation to newbies is don't forget to learn DTML. Some day you will rediscover it. http://www.zope.org/Members/ausum/CMFPortlets/Docs/readme_052/index_html#c Ausum
He should use TAL instead, of course. No kidding this time. :) It's much more suited for what he wants to do.
From: "Ausum Studio" <ausum_studio@hotmail.com>
Maybe you should write the inventor of this very complicated way of doing scripting and say "Hey, we tried that. It's a bad idea." :)
Yes, for many applications. For many others DTML is a strong language that will do the job that page templates couldn't. So my humble recommendation to newbies is don't forget to learn DTML. Some day you will rediscover it.
http://www.zope.org/Members/ausum/CMFPortlets/Docs/readme_052/index_html#c
Sonce so many people are bashing DTML nowadays I feel the need to +1 on this and on the referenced article. When looking into customising Plone and CPS for instance, I find that many ZPT pages look to be as hard and tedious to follow as some of the my own bad DTML pages are. This is no bashing of ZPT mind you, I just think that if DTML is being misused, then it isn't DTML's fault. And I am sure that ZPT can be misused in a similar manner. /dario
Hi, On Fri, 14 Feb 2003 07:51:22 +0100 Dario Lopez-Kästen <dario@ita.chalmers.se> wrote:
From: "Ausum Studio" <ausum_studio@hotmail.com>
Maybe you should write the inventor of this very complicated way of doing scripting and say "Hey, we tried that. It's a bad idea." :)
Yes, for many applications. For many others DTML is a strong language that will do the job that page templates couldn't. So my humble recommendation to newbies is don't forget to learn DTML. Some day you will rediscover it.
http://www.zope.org/Members/ausum/CMFPortlets/Docs/readme_052/index_html#c
Sonce so many people are bashing DTML nowadays I feel the need to +1 on this and on the referenced article.
at least -0.8 from me ;)
When looking into customising Plone and CPS for instance, I find that many ZPT pages look to be as hard and tedious to follow as some of the my own bad DTML pages are.
I saw that. The problem is, the authors of said pages still do it the wrong way [tm]. There is still much too much DTML bias in the code. Its biggest manifestation is the often used tal:define. Someone told me if he has to write all the code into seperate python scripts, he would need a BtreeFolder to hold them all - but this is pointless, because the code has to be looked up anyways and I bet a folder is a better container then a page template.
This is no bashing of ZPT mind you, I just think that if DTML is being misused, then it isn't DTML's fault. And I am sure that ZPT can be misused in a similar manner.
Unfortunately yes. We need a get-values-or-actions-on-first-use-mechanism to get full use of the abstraction of ZPT. The implementations that exists are often too complex for most people so its rarely used. For example ZPatterns. Regards Tino
Dario Lopez-Kästen wrote:
When looking into customising Plone and CPS for instance, I find that many ZPT pages look to be as hard and tedious to follow as some of the my own bad DTML pages are.
ZPT is far superior to dtml! I have recently made the switch, after 3 years of dtml, and I must say that I was very pleasently surprised. Initially I believed that zpt would be more verbose. But that is not really the case. It is also much easier to read the code, as all the tags add up. It is especially metal that makes the biggest difference. Metal is just so brilliant. It makes it possible to create layouts where you only need to define your visual elements once, and you can re-use them all over your site. Which means that you can create a skin for a complete site using only 2 zpt's and a css. That is *so* brilliant. regards Max M
participants (6)
-
Ausum Studio -
Dario Lopez-Kästen -
Evan Simpson -
Lennart Regebro -
Max M -
Tino Wildenhain