[ZPT] Questions on Philosophy

Evan Simpson evan@digicool.com
Thu, 17 May 2001 11:22:47 -0400


From: "Chris Withers" <chrisw@nipltd.com>
> 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

No *non-presentation* logic.  Presentation logic (i.e. should I show this?
How many times?) is fine.

>    - plug in their logic (through (Python) Scripts specified in XTML
attributes of HTML tags)
>    - access their content/storage layer through these scripts

Hrm.  Well, sort of.  You can apply a Page Template directly to a piece of
content, or to a Script (or other object) that acts as a controller.

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

Very much so.  The difficulties here are becoming increasingly daunting.

> 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

Presentation managers will have to have at least a minimal awareness of TAL
and METAL.  It's unreasonable to hand a template with *any* sort of
unintrusive markup to someone ignorant of the markup, let them edit it in
arbitrary ways, and expect to get it back intact.

> 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

Yes, this bites Emacs users as well, and it's a fundamental problem with all
tools that treat a Zope object as a file on a filesystem.  When you're
editing any Zope object, you hardly *ever* want this behaviour because it
breaks history, properties, security, and great-ghu-knows what else.

Cheers,

Evan @ digicool