[Zope3-dev] Number of languages in Zope 3

Steve Alexander steve@cat-box.net
Tue, 08 Apr 2003 16:46:01 +0200


> 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.


> and in ZPT:
> 
> string:blabla/${here/title}"
> 
> python:'blabla' + here.title
> 
> etc.
> 
> 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.

The new "use adapters within path expressions" syntax that was discussed
previously on this list, and will be implemented for Zope 3, will vastly
reduce the need for python expressions.


> A quick fix for the first part of the problem would be to always 
> encourage the use of real Python expressions. They might be harder to 
> learn in the first place, but later, when people advance into coding 
> their own Python Scripts or even new components they will already be 
> familiar with the syntax.

I disagree, as I mentioned earlier. I suggest that templates are kept
free of code.


> Being able to choose the available API calls from dropdowns, getting 
> help on the available parameters and stuff like that would make the 
> whole task a bit easier.

I like the idea of an IDE to assist with writing templates. This could
tie into the "syntax for using adapters in path expressions" stuff very
nicely.

--
Steve Alexander