[ZPT] Questions on Philosophy

Evan Simpson evan@digicool.com
Thu, 17 May 2001 13:02:24 -0400


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

How do you get 4 or 5?  The way I think of it, there's Python and DTML, and
now ZPT.  I don't count Perl Methods, since they're an add-on, Python is
hardly Zope-specific, and DTML is actually usable (and used!) separately
from Zope.  PageTemplates are meant to be separately usable, but that hasn't
been tested.

This situation should improve as we regularize and converge the three.  Zope
2.4 uses the same RestrictedPython engine for Scripts and Python in DTML
(and ZPT, soon).  TALES expressions will become usable in DTML, and path
expressions will be usable in Python starting in the next release.

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

Yes.

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

Paul suggested this as well.  Of course, Emacs does it differently: rename
original to backup, create new file with the original name.  This would
require making a copy of the renamed object, or doing a copy-from-history,
then saving the new version.  There's also the issue of how (and how long)
to preserve the "there used to be an object here" information.  If the tool
performs the delete/write or rename/write on two (or more?) separate
requests, the operation will have to span multiple transactions. This
*might* be doable, though it feels to me like it might put us in deep
voodoo.

Hmm.  On object creation and rename (through FTP and WebDAV only?), we check
the history of the container to see if there is a "recent" version (only the
most recent one?) with a subobject of the same name.  We copy the historical
version of that object into the present and continue.  Blech.

Cheers,

Evan @ digicool