[Zope3-dev] Re: Zope 3 Newsletter: Issue 10
Max M
maxm at mxm.dk
Mon Sep 8 19:04:48 EDT 2003
Paul Winkler wrote:
> Today, most of our really evil dtml gunk is long gone, and the not-evil-
> but-could-be-better gunk is still chugging along happily, and most
> new stuff that I've implemented uses CMF.
I also got "shocked" by this suggestion to begin with, until I realised
what the main difference was.
We allready have Python in PageTemplates. Excepts that it is forced to
be one liners. This can be pretty tiresome too. If you see how
tal:define="some_var python:somecode()" is used in Plone it too gets
ugly real fast. A Python block with the definitions would definitely be
an improvement.
I assume that there will be no "print" statement in the Python blocks.
So you can only use the python to generate values that will be rendered
by tal in the PageTemplate. This is a big difference from .asp & .php as
you are still forced to do it the "right way". you'd might even call it
a pedagocical tool.
Anyway it still leads to clear seperation of code and content if done right.
But I think that each Python block needs it's own namespace, and some
way to explicitly state wich variables are exported to the tal
namespace, else it will quickly become a clutter of variable names that
are mixed up in the template, and it can be hard to follow where each
variable comes from.
regards Max M
More information about the Zope3-dev
mailing list