[ZPT] Truncating strings

Charlie Clark charlie at begeistert.org
Thu Oct 23 08:13:52 EDT 2003


On 2003-10-23 at 13:57:24 [+0200], Shane Hathaway wrote:
> That's one of the goals you can achieve with ZPT, but it's not the real 
> goal.  The real goal (as chosen by Zope Corporation) is to create dynamic 
> pages without burdening either the programmer or the designer.  Complete 
> separation does not necessarily achieve that goal.  If you want a 
> templating language that truly separates code and design, which tends to 
> become a burden for both programmers and designers, you should look at 
> what Phillip Eby has been cooking.

I have to agree with Shane here: complete separation can be a real pain - 
XSLT anyone? ZPT is a nice compromise. You need page designers who 
understand enuff programming to be able work with it without breaking it 
but why does everyone thing web pages should be easy?
 
> > What on earth is wrong with preparing the data before use in ZPT? Most 
> > of the problems are solveable yet with python scripts.
> 
> Should every template have an associated script?

For those containing exteral data I think this is a very good rule of 
thumb, yes. It encourages separation of logic layers so that the ZPT is 
easier to read. Over on Zope-DB there was a very good suggestion that in 
fact all pages should always be called by a script anyway. I've lost the 
mail but it was very well-argued and thought provoking and, after looking 
at some CMF / Plone source, I will certainly give it some consideration.

Charlie



More information about the ZPT mailing list