[Zope-PTK] PTK workflow proposal

Maik Roeder roeder@berg.net
Sun, 27 Aug 2000 17:08:20 +0200


Hi !


> To make a long story short, the first part is templating. Where instead
> of using a header and footer, you use a plain html template with a
> <dtml-var body> in the area where you want the content to render.
> Content being an object.

Templating is easy to achieve already, using ZClasses. This is used in
the ZDP-Tools that run the ZDP site at http://zdp.zope.org , where I
have one base ZClass DocumentFolder. The DocumentFolder defines templates
in the ZClass that are valid for all DocumentFolders, and two body
sections that the Writer can use in instances of DocumentFolder:

abstract
content

The idea of the DocumentFolder is that you always can have documents
that contain documents that contain documents ... 
The DocumentFolder contains abstract and content as DTML methods,
but possibly many other DocumentFolders as well. So, in the end this
is a generic Content Management Framework, because you are always
free to add whatever kind of content you want to anything that is
already there.

All the other ZClasses I am using in the ZDP-Tools, are derived from
DocumentFolder. So, I would have a ProjectFolderClass instance that contains
the abstract and content, but can also contain ProjectClasses. These
again, can contain CommentFolderClasses and these can contain Comments,
always with content and abstract inside as defined by the 
DocumentFolder base class.

Once you get used to this way of thinking, it is really easy to
create something like for example a JobBoard. Just create a JobFolderClass,
and a JobClass. Maybe the designer would like to change the way a Job
is listed in a JobFolderClass, but nothing much else has to be done
really ! The whole Framework is defined in DocumentFolder. For the
Writer, nothing changes at all ! The only thing that changes is that
he suddenly can add JobFolders and Jobs, but the editing of content and
abstract is defined in DocumentFolder.

All this is based on the idea of Model View Controller:

Model: JobClass 
Controller: JobFolderClass
View: Parts of it in the JobClass, and parts of it in JobFolderClass,
and parts of it in DocumentFolder.

Spreading the View over the whole place is no problem for as long as
you have one site. Once you start customizing it for another site,
and want to update the DocumentFolder Product, this become ugly,
but this is a general problem of ZClasses.

I am working on a system that allows you to define the View
in the Site itself. The beginning of this can already be seen here:

http://zdp.zope.org/projects
http://zdp.zope.org/projects/eurozope/

The index_html of DocumentFolder first calls a standard_zdp_template
which has to exist one time in the root. This standard_zdp_template
calls a method called Template. This Template method now, resides
inside DocumentFolderClass, and defines the normal view as can be seen
at http//zdp.zope.org/projects . If there exists a standard_zdp_template
other than the one in the root folder, it now has the power to call
something else than the Template method from the DocumentFolderClass.
This is what happens at: http://zdp.zope.org/projects/eurozope.

Paul Everitt said at the Paris Zope Meeting that the PTK will be more
of a Content Management System in the future, and not just a Portal
Toolkit. I would like to discuss with the PTK folks whether the
ZDP-Tools approach can be of any use for the PTK.

Best regards,

Maik Röder

-- 
"The computing future is based  on "cyberbodies" - self-contained, 
neatly-ordered,  beautifully-laid-out  collections of information, 
like immaculate giant gardens." The second coming - A manifesto. David
Gelernter http://www.edge.org/3rd_culture/gelernter/gelernter_p1.html