[ZPT] Questions on Philosophy

Chris Withers chrisw@nipltd.com
Thu, 17 May 2001 15:55:22 +0100


Hi,

I've finally started playing with ZPT today as opposed to just looking at it ;-)

I'm a bit confused about the aims though, are they to:

1. Aid the splitting of the Presentation, Content and Logic layers by allowing
people to easily:
   - define a presentation layer (the ZPT's) that contains nothing but sample
content and no logic
   - plug in their logic (through (Python) Scripts specified in XTML attributes
of HTML tags)
   - access their content/storage layer through these scripts

2. Enable content authors to use tools such as Dreamweaver and GoLive to edit
HTML in GUI/WYSIWYG environments even after 'coders' have plugged in application
logic.

3. Something I've missed?

The sample page templates in the distribution and the comments on this list
suggest that 1 isn't an aim and I think 2 is _extremely_ hard to do.
For example, I tried editing the show_text example using DreamWeaver (through
WebDrive on WinNT into Zope via WebDAV*) but I managed to break the template
simply by using the GUI to change the second cell with 'Source' in it to be of
an Arial-ish font type (I had to set the paragraph format to 'None' rather than
'Preformatted' from the DW dropdown list for this to work though) which would
seem like a pretty normal thing to happen in 2.

I had a really good feeling about ZPT a few months back but I think I'ev got
slightly off track now. Can someone help me back on?

cheers,

Chris

* opening the ZPT this way was really cool and really smooth, however when I
saved it, I ended up with a File object as the DreamWeaver cycle goes:
- save file to temporary file all the time
- when user hits save:
 - delete old file
 - rename temp file to filename
- repeat ;-)

Can I use a put_factory to solve this problem?