[ZPT] index_html a script, not a template

Peter Bengtsson mail@peterbe.com
Mon, 7 May 2001 17:38:29 +0200


[1st: Sorry for crossposting, but now it actually makes sense]

Under the topic: "Relying on scripts" in Jim Fultons IPC9 presentation on
Presentation Templates
http://www.zope.org/Members/jim/Info/IPC9/PresentationTemplates/index.htm


"Maybe scripts, rather than templates will commonly be URL target."
-- from
http://www.zope.org/Members/jim/Info/IPC9/PresentationTemplates/text20.htm


Until the last couple of days I'have always made DTML Methods or DTML
Documents for everything that users type into the addressbar like
"index_html" or "about".
I.e. I start with a template and most likely end up in a template.
It shouldn't be like that, should it, always. Because some of my templates
might look like this:
<dtml-var standard_html_header>
<dtml-if "iscooluser_externalpy_orscript()">
   <dtml-with foo><dtml-var showthat></dtml-with>
<dtml-else>
   <dtml-with bar><dtml-var showthis></dtml-with>
</dtml-if>
<dtml-var standard_html_footer>

Recently my sites are filled with sometimes three times as many python
scripts as DTML objects. And Jerome Alets Zshell really opened my eyes for
loosing templates.

Am I alone on using templating objects for URL-hitting objects? What are the
implications (performance, scalability in terms of feature changes, etc.) of
using Python Scripts or External Method instead of templates?
Is there a paradigm shift with these promising Page Templates (see quote
above)?
Advice from people with zen?!?!


Trying to see as long as possible, Peter