[ZPT] Questions on Philosophy

Chris Withers chrisw@nipltd.com
Thu, 17 May 2001 16:52:32 +0100


(ugh, sorry for the wrapping in my first mail)

Evan Simpson wrote:
> 
> > 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.

Sorry, but some of the stuff in the sample templates looked pretty scary. But, I
suppose how much logic (of any type) you choose to put in the presentation layer
is entirely up to your personal preference. For myself and anyone I'm
responsible for, I'd say the absolute minimum to make the thing work, and that's
from bitter and painful experience with Squishdot and several other products.

What do you ZPT guys feel about introducing another two scripting languages to
Zope? I see people like WebWare's author and AMK are using this as a reason not
to use Zope, and what with 4 or 5 scripting languages (3 of which are currently
Zope-specific) I can see their point. I know I'm playing devil's advocate here
but what do you guys feel about this?
 
> >    - 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.

OK, all that means is that in certain circumstances you have a logic layer
that's so small it isn't there, yeah?

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

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

Yeah, I'm not sure you can win this battle. I mean, Nirvana for me would be to
not have to even see HTML source when I'm playing 'content editor', but I
suppose if all you need to tell your content authors is: 'make sure anything
inside a tal="" stays where it is' then I think I can live with that.
It's another argument for having as little logic as possible in the actual ZPT
;-)

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

OK, here's some logic to try, maybe you could code it and see what happens?

If you rename an object to a name(path?) that has been deleted, actually bring
that object back to life and save it as a new version of.
Properties, security, history, etc would be resurected in the same way. IIRC,
thsi is hwo CVS behaves when you bring back objects that have been removed in a
previous version.

I wonder how hard that'd be to do it Zope? Maybe it's a question for zope-dev or
a for a proposal on dev.zope.org?

cheers,

Chris