[Zope3-dev] Re: Re: tal:define="..." considered harmful?

Jean-Marc Orliaguet jmo at ita.chalmers.se
Thu Feb 16 14:05:56 EST 2006

Paul Winkler wrote:

>On Thu, Feb 16, 2006 at 07:06:03PM +0100, Jean-Marc Orliaguet wrote:
>>Yes, that's what I mean. Clearsilver is a good example. There are 
>>several advantages:
>>- the data structures are platform-independent (they can be encoded in 
>>JSON, C, python), and they can be easily converted from one language to 
>>another, even to and from XML,  this simplifies the transport too (e.g. 
>>in Ajax, webservices)
>>- the template does less, it does not need to know anything about zope, 
>>it works faster, the data access from inside the template is not an 
>>access to the ZODB ...
>>- it is possible to create a simple schema definition from the data 
>>structure itself (this is what I've done in the Ajax toolkit I'm writing)
>Another advantage:
>- the template itself is truly platform-independent
>... which is attractive in mixed-platform environments.
>The StringTemplate guy has an interesting take on
>templating and model/view separation:
>Particularly the stuff about the five rules implied by
>strict model-view separation.

that's very interesting, what's missing is a javascript port. But 
conceptually the idea is:
write your template once and deploy it on your server, on your client, 
in your UNIX scripts, etc.. (that's basically the idea with XSLT, except 
that not many feel that XSL is easy to write).

I think that the principles stated in that article, of clean separation 
between model and view (called "encapsulation") are more important than 
the  template's actual syntax. But the syntax is important too since 
it's humans who write templates ..


More information about the Zope3-dev mailing list