[Zope-CMF] Re: Why do we need types.xml and workflows.xml?

yuppie y.2008 at wcm-solutions.de
Sun Jun 29 09:04:29 EDT 2008


Hi!


Martin Aspeli wrote:
> The GS handlers for portal_types and portal_workflow both require a 
> single file - types.xml and workflows.xml - that declares the objects, 
> and a directory full of files - types/*.xml and workflows/*.xml - to 
> initialise them.
> 
> However, in both cases, there is enough information in the per-item 
> files (id, meta_type) to make the types.xml and workflows.xml redundant. 

Some tools are ordered containers, the types tool might become ordered 
as well. GS always specifies the order of sub-objects in the container's 
file.

Right now we have a relatively easy rule: Adding, moving or removing 
sub-objects modifies the container, so these changes *always* have to be 
specified explicitly in the container's file.

'id' and 'meta_type' in the per-item files are not really used. Would it 
be an improvement to remove that redundant information from the per-item 
files?

> Worse, it's easy to forget, and no warning that there are "orphan" files.

Adding a warning might be an other solution.

> I'm pretty sure it's an easy fix to make types.xml and workflows.xml 
> optional (or even deprecated, though of course workflows.xml also has 
> bind information that should remain there).

All the information required for adding, moving or removing sub-objects 
is currently stored in the container's file. Additional code and 
complexity is necessary to extract that information from per-item files.

Cheers,

	Yuppie




More information about the Zope-CMF mailing list