[Zope] Editing DTML Methods with Emacs ?

Paul Everitt Paul@digicool.com
Tue, 7 Sep 1999 10:21:04 -0400


Gregor wrote:
> I remember this problem was raised here once, but I don't 
> know if there's
> a solution now: I'd like to use something else than 
> Netscape's text widget
> to edit my Zope site. XEmacs would be preferred. Ftp access 
> to the site
> does work with the /superuser@host#8021:/ syntax. The problem 
> is that if
> I edit and save a DTML method with XEmacs, the method turns 
> into a DTML
> document, breaking the logic of the site.
> 
> I think I understood the underlying problem (ftp just can't 
> express the
> differences between the objects), but I don't remember if 
> there was any
> workaround.

This, I'm afraid, is a big problem.  Trying to get a dumb object system
(FTP) to play with a smart object system (the web object model) is quite
problematic.

I can tell you the basic idea we have around here to address this, but
I'll warn that there is no activity to implement.  Thus, consider this a
suggestion, and I'll note that patches are accepted. :^)

Basically, one proposal allows _all_ objects to have a discoverable XML
interface via FTP.  You walk up to a Folder.  You see a special folder,
perhaps "mgmt".  You go into that folder and you see a bunch of things
that look like files, such as "addFolder.xml".  You GET that "file",
edit it.  When you save it, Zope makes the appropriate change.

The benefit here is that you can express all kinds of metadata.  You
certainly can manipulate all the built-in classes (folders, etc.), but
you can also grab Python products and ZClass products.  You can also get
at the interface to edit properties, change security settings, etc.

In some cases this interface could be more convenient that the current
one.  For instance, you edit a "listAllDTMLDocuments.xml" file that
contained an XML representation of all the folder's DTML Documents.  You
could then do a global search and replace using standard Emacs/XEmacs
tools.  Alternatively, you could create a .xml "file" that let you add
ten things at one time.

Essentially you take stupid files, find a way to express richer
semantics (XML), then use this to script the Zope object system.

Just my $0.02.  Again, this isn't on the radar, but some discussion has
been put into it.

--Paul

Paul Everitt       Digital Creations
paul@digicool.com  540.371.6909
-----------------------------------------
The Open Source Zope application server
http://www.zope.org/