Hello everyone, I have been hanging around #zope on IRC a lot recently and noticed that a lot of newbies ask a lot of DTML questions. I tried to answer their questions but I always pointed them to ZPT in the end. I was amazed that the majority had never heard of ZPT or thought that their problem could only be solved with DTML. I've been emailing with Chris McDonough (see out thread on the ZDP mailinglist) and we found that the following two reasons might be responsible to this: a) newbies, esp. scripters, like to play around without reading docs b) the tutorial is grossly out of date a) seems is a common behaviour which we cannot change. We can, however, change what newbies find on their path of trial and error. I think a big false symbol is that index_html is still a DTML Method. Everybody with some knowledge of web suite building knows what a index.html is so they will most likely look at that object named index_html. They see that it is a DTML Method so they'll say "Aha! HTML in Zope is done with DTML Methods". Therefore, I propose to make index_html a PageTemplate for 2.7. Since this change would not affect the framework at all, it should not interfere with the release schedule for 2.7. Please correct me if I'm wrong. Thoughts? Phil
FWIW I think this is an excellent idea, and I agree with your reasoning. You have described more or less how I got started with Zope. I spent almost a year in the DTML doldrums before discovering the ZPT light at the end of that tunnel. Even after I heard from many people that ZPT would make my life better, I did not make the jump right away because I had invested so much time and effort learning DTML, and had lots of DTML scripts that worked. ... I beg of you.. Please save others from my fate. :) * * * * PS The Zope Book online should also be re-written to properly contextualize the two technologies. This may be alot of work. However, at the very least, one could place giant warnings at the top of every page describing DTML. I think the proper message is something like the following: DTML is not going away. However, DTML is being de-emphasized in favor of a newer technology called Zope Page Templates. The two technologies have a large amount of overlap, but not 100%. There are still a few things one can do in DTML that can not be done in ZPT. One rule of thumb is as follows always use ZPT if possible, but fall back to DTML if necessary. Then we could start a list of the (few) areas where DTML is still the only or better choice. We can rely on the community to help us fill in that list via comment fields. This, incidentally, can help point the way for us to enhance ZPT to cover those areas, or perhaps provide some convenience libraries so PythonScripts could be used to make up the difference. Thoughts? --Craeg Philipp von Weitershausen wrote:
Hello everyone,
I have been hanging around #zope on IRC a lot recently and noticed that a lot of newbies ask a lot of DTML questions. I tried to answer their questions but I always pointed them to ZPT in the end. I was amazed that the majority had never heard of ZPT or thought that their problem could only be solved with DTML.
I've been emailing with Chris McDonough (see out thread on the ZDP mailinglist) and we found that the following two reasons might be responsible to this:
a) newbies, esp. scripters, like to play around without reading docs
b) the tutorial is grossly out of date
a) seems is a common behaviour which we cannot change. We can, however, change what newbies find on their path of trial and error. I think a big false symbol is that index_html is still a DTML Method. Everybody with some knowledge of web suite building knows what a index.html is so they will most likely look at that object named index_html. They see that it is a DTML Method so they'll say "Aha! HTML in Zope is done with DTML Methods".
Therefore, I propose to make index_html a PageTemplate for 2.7. Since this change would not affect the framework at all, it should not interfere with the release schedule for 2.7. Please correct me if I'm wrong.
Thoughts?
Phil
Craeg K Strong writes:
FWIW I think this is an excellent idea, and I agree with your reasoning. [...] Philipp von Weitershausen wrote:
Therefore, I propose to make index_html a PageTemplate for 2.7. Since this change would not affect the framework at all, it should not interfere with the release schedule for 2.7. Please correct me if I'm wrong.
+1 from me, too. Just a trivial "technical" comment: If migrating "index_html" from DTML, one maybe should additionally fix the current 'standard_html_header/footer'. These cannot be replaced well by ZPT as they do present valid XHTML document. Instead one would need a "standard_html_layout" containing a METAL macro, say "main" and a slot "content": <html metal:define-macro="main"> <head> <title tal:content="here/title_or_id">The title goes here</title> </head> <body bgcolor="#FFFFFF"> <metal:block define-slot="content" /> <p tal:content="structure here/ZopeAttributionButton"></p> </body> </html> The default 'index_html' then would like: <html metal:use-macro="here/standard_html_layout/macros/main"> <body metal:fill-slot="content"> <tal:block content="structure here/zope_quick_start" /> </body> </html> Hm, now people have to swallow METAL, too. Does this look like a good or a bad thing? Cheers, Clemens
Clemens Robbenhaar wrote:
The default 'index_html' then would like:
<html metal:use-macro="here/standard_html_layout/macros/main"> <body metal:fill-slot="content"> <tal:block content="structure here/zope_quick_start" /> </body> </html>
Hm, now people have to swallow METAL, too. Does this look like a good or a bad thing?
I believe this is a good thing. METAL embodies the power of ZPT... the more people are encouraged to use ZPT + METAL, the better/more reusable/less redundant their code will be, i.e., they will thank you in the long run. Don't you think?
On Sun, 2003-05-18 at 14:12, Craeg K Strong wrote:
DTML is not going away. However, DTML is being de-emphasized in favor of a newer technology called Zope Page Templates. The two technologies have a large amount of overlap, but not 100%. There are still a few things one can do in DTML that can not be done in ZPT. One rule of thumb is as follows always use ZPT if possible, but fall back to DTML if necessary.
There are many places in the 2.6 edition of the Zope Book which say approximately the same thing. - C
participants (5)
-
Chris McDonough -
Clemens Robbenhaar -
Craeg K Strong -
Duncan McGreggor -
Philipp von Weitershausen