[Zope3-dev] Number of languages in Zope 3

Joachim Werner joe@iuveno.de
Tue, 08 Apr 2003 19:11:30 +0200


Steve Alexander wrote:
>> My opinon is that the best way to go would be using real Python 
>> expression syntax wherever an expression is used.
> 
> 
> I think it should be easy to use real Python classes to support templates.
> Zope 3 makes it easy to develop presentation components in this style.

Yes, that's right. I like how you can write your own methods in a view's 
  Python file and use them from the template files. That's how Zope 2 
used to be when DTML didn't have all these features yet and people just 
used it for writing templates ...


>> The main problems are that we switch between explicitly calling 
>> methods and handling them as attributes and between "." and "/" 
>> delimiters almost randomly.

> I agree that this is not ideal. I suggest that python expressions should
> never be used in ZPT.

Well, it's allways or never. As soon as you HAVE to use python 
expressions for some advanced stuff it is (IMHO) better to make it the 
default from the start. Dots and brackets are not that much harder to 
understand than paths.

I can agree with you if Zope 3 ZPT (at least for the non-expert users' 
daily use) can be kept completely free of Python. But my experience from 
DTML (and ZPT in Zope 2) is that you will sooner or later end up having 
to use some Python anyway.

Joachim