[Zope-dev] Making index_html a PageTemplate

Craeg K Strong cstrong@arielpartners.com
Sun, 18 May 2003 14:12:14 -0400


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