[Zope3-dev] Re: Zope 3 Newsletter: Issue 10

Shane Hathaway shane at zope.com
Mon Sep 8 11:39:33 EDT 2003


Jim Fulton wrote:
> If the logic is that complex, I woudln't do it in a script
> tag.  I don't think the people using script tags are going
> to be writing logic that complex.

Boy, this is a hot debate.  But I also think it's a distraction.

Paul Winkler and I recently discussed page templates on zope-dev.  Paul 
advocated more Python expressions in page templates, while I maintained 
that the constraints placed on page templates warrant the need for path 
expressions.  One thing I learned from the discussion is that Python 
expressions are limited by design; many simple operations require 
statements instead.  This creates a tension to allow code blocks in 
templates.  But hard experience by numerous web developers (who have had 
to maintain templates written by others) creates a tension to not allow 
code blocks.  These opposing forces are quite strong and lead to hot 
debates like this one.

Stephan, I suggest you remove <script> support because it's distracting 
people from getting real work done and encouraging them to debate 
endlessly about a question that has no correct answer. :-)

FWIW, I would like to see this debate resolved through the use of 
recently introduced mechanisms.  A folder full of Python scripts is 
equivalent to a Python module containing only functions, therefore, we 
should provide a simple UI for site developers to write persistent 
modules.  Then we should provide an easy way to call persistent modules 
from templates; the new prefix stuff should be pretty effective for that.

Shane




More information about the Zope3-dev mailing list