[Zope] DTML or TAL

Chris Withers chrisw@nipltd.com
Sat, 25 May 2002 11:54:05 +0100


Jim Penny wrote:
> 
> Ah, but there are things in zope that can simply not be done, as far as
> I know, with ZPT.

Can you give some examples? I love a good challenge ;-)

> These things certainly includes ZSQL methods.  

There's no reason why ZSQL methods couldn't be done use ZPT, but no-one has
written a parser for them yet. To be fair though, the whole database integration
side of Zope hasn't been worked on in a _long_ time (I'm not sure if this is the
case in Zope 3...) and has other intricacies beyond being DTML-based that make
them 'interesting' ;-)

> They probably include
> places where you want to use the equivalent of dtml-with (although I

I find tal:define takes care of any situation where I'd have used dtml-wtih
before...

> this kind of stuff for).  And using ZPT in python products seems to be
> not well documented, and may be problematic, see "Grrr for ZPT and
> python product" on the zope mailing list.

Couldn't find the thread, what's the problem? I use these all the time...

> While I believe that ZPT is superior to DTML, in ZPT's intended
> realm, there can be no doubt that ZPT looks pretty unfamiliar to a
> programmer who does not have an extensive XML background.

...so does any other language to people who haven't seen it before ;-)

> One of the things I need to get around to is writing some example code
> showing alternate styles in simple tal.  I think that much of the Zope
> Book's example code will prove to be non-idiomatic.

http://www.zope.org/Members/peterbe/DTML2ZPT

...although I'd code some of the examples there differently, but it is a good
place to start...

cheers,

Chris