[Zope-dev] Using DTML is too difficult
Anthony Pfrunder
s341625@student.uq.edu.au
Thu, 11 Nov 1999 07:55:29 +1000 (GMT+1000)
Hi,
Noting this interesting discussion I thought I might butt in with some
ideas.
Firstly, Python Methods are *really* cool! By making them with parameters
of [self, REQUEST] you can use them as drop-in replacements for DTML
methods/Docs. A lot of the disadvantages mentioned are solved in Python
Methods.
With regards to a DTML replacement you may wish to look at the ideas
expressed in the MFI, XMLWidgets and my never-ending project - VisualZope.
VZ works by having a XML Form with namespaces (almost) implemented. Then,
by defining widgets in either Zclass/Repository or in the acquisition path
of the Form you can define how Form tags are interpreted. This is so
useful that I've added a simple "intelligent" version of dtml-var to allow
XML forms to be merged together.
Basically, Forms are like DTML Documents except that they provide a
structured way of modifing other parts of the Form than the area indicated
by the tag. So, you can "include" a widget and the divisions will be
created, the css sheets merged in and the javascript client-side DOM will
be added all automatically. They will all be placed in the correct place
without having multiple <dtml-vars>.
We *NEED* behaviours (the equivalent of the MFI selection system I think).
For example, if you add the "window" behaviour to the tag above then the
behaviour will add in css,division additions to make it look like a MDI
window and add javascript code to the constructor to make it draggable,
resizable and hiddable. If you then add "ZAMLEditor" behaviour then you
can use the XMLWidgets style of editing to edit the contents of this
window. Yet another idea is to add the "theme-beos" behaviour before the
window behaviour to make the window use the pixmaps etc in the beos theme.
By the way - can DigiCool add ZWiki to the Zope.org site? This would be
*really* cool for adding group scratchpads for various projects.
Cheers,
Anthony Pfrunder
Computer Systems Engineering
University of Queensland