Home Geschichten Kunst Computer Tindertraum

[current]

Zope Page Templates (ZPT)
(Monday 11th February 2002)

I just looked at Eberhard's page and found him discussing the ZPT. Zope being a 'watch-if-you-have-time' thing for me I never really paid any attention to this...

But the I had a look and there is one thing about this that is actually a real mind-bomb to me.

Let me quote Eberhard: ZPT templates can be designed as mockup pages even containing sample text at all the places that will be modified at delivery time. Good for the designers. Contrary to ASP/JSP/PHP the markup here is invisible for browsers and also non-invasive for HTML editors, because there aren’t any replacements of <%pseudo-tags%> by expression results.

Example (taken from the Dr. Dobb's article):
<html>
  <head>
    <title tal:content="here/title">Econo Feeder</title>
  </head>
  <body>
    <h1 tal:content="here/title">Econo Feeder</h1>
    <img src="econo-feeder.gif" alt="Econo Feeder"
         tal:attributes="src here/image_url; alt here/title">


I think this aproach is absolutly the best one I`ve seen to date. The templates work in standard HTML-IDE, and still work as templates.

In my work I already use something similar, were the resulting HTML-page is also the template for later parsings. The page gets updated 'in place' so to say:
<h1><template:include title>This title will be replaced</template:include></h1>
That works rather well, but I think the ZPT are one step further (and my aproach currently only deals with simple variable replacement, but could easily be expanded)

ZPT SimpleTutorial
Why Yet Another Template Language?
There are plenty of template systems out there, some of them quite popular, such as ASP, JSP, and PHP. Why invent another?
First, none of these template systems are aimed at HTML designers. Once a page has been converted into a template, it is invalid HTML, making it difficult to work with outside of the application.

[ by Martin>] [permalink] [similar entries]

similar entries (vs):

similar entries (cg):

relevant words



Martin Spernau
© 1994-2003

traumwind icon Big things to come (TM) 30th Dez 2002

Cluster analysis
Oblique Strategies, Ed.3 Brian Eno and Peter Schmidt



amazon.de Wunschliste





 

usefull links:
Google Graph browser
Traumwind 6-Colormatch
UAV News

powered by SBELT