[Zope-CMF] Re: [dev] CMFSetup: some questions

Tres Seaver tseaver at zope.com
Thu Jul 15 20:32:53 EDT 2004


yuppie wrote:
> Hi!
> 
> 
> Had a first look at CMFSetup. I think this is a very useful tool.
> 
> 
> General Questions:
> ------------------
> 
> 
> 1.) dependencies and integration
> 
> Right now CMFSetup is an add on. You don't have to install that Product 
> if you don't want to use it. But if you want to use it, you have to 
> install CMFCore, CMFDefault, CMFTopic and DCWorkflow.
> 
> Third-party products should extend the tool by registering import / 
> export handlers. Wouldn't it make sense to do the same for products like 
> DCWorkflow? That way the framework CMFSetup needs to know nothing about 
> DCWorkflow and we have an example for third-party products.

I wouldn't mind factoring it that way, although the current setup seemed 
to "localize the concerns" when I came up with it.

> What about adding the setup tool to a new CMFDefault site by default?

I had intended to replace the factory registration for CMFSite, so that 
CMFDefault no longer registered the "stock" CMF site;  instead, CMFSetup 
would register a factory, which would then allow you to create a site 
using any registered profile.

> 2.) default profile
> 
> The default profile seems to be CMFDefault data, while it is not 
> completely in sync with CMFDefault.
> 
> Shouldn't this profile live in CMFDefault and be in sync?

The default profile is intended to replace (eventually) everything in 
CMFDefault.Portal.PortalGenerator.  As I said above, moving the 
"configuration / setup" logic out of the product seemed attractive to me 
at the time.  Over time, I would like to see CMFDefault become simpler, 
declaring pretty much only the "stock" content classes (I think the 
membership stuff should move out into a separate product).

I envisioned third-party products which did little more than register 
new profiles and skin directories (e.g., the original "PloneSkin" 
product would have been a good fit).

> What would be necessary to use that profile also for site creation?

Any product will be able to register one or more profiles.

> 3.) export_steps.xml
> 
> Why is 'export_steps.xml' part of a profile? Currently I have to load 
> the default profile to be able to export something or make a snapshot.

It is a kind of chicken-or-egg problem:  until you have loaded a 
profile, you don't know what export handlers are available.  I was 
avoiding (because I had seen it in the earlier client-driven version) 
the complexity of a model where products registered free-standing export 
handlers;  dealing with conflicts among them was too painful.

> Detail Questions:
> -----------------
> 
> 
> 4.) lists in xml
> 
> Sometimes lists are stored in attributes using values like::
> 
>     ','.join( action[ 'permissions' ] )
>     ' '.join(info['roles'])

That could probably be regularized.  I prefer the space-delimited 
version (because it follows the pattern of the XML IDLIST) but 
permisison IDs can have spaces embedded in them (actually, role names 
probably can too).

> Sometimes they are stored in subelements. Does that follow any policy?

For "simple" lists of strings, subelements seem overkill.  OTOH, I have 
heard lots of complaints from XML-centric about the "attribute-heavy" 
nature of ZCML.  If there is any chance that the information is (or 
might become) richer than a single string, then subelements are an 
obvious win.

> 5.) action elements not in sync
> 
> I guess at least 'apcExport.xml' and 'ticTypeExport.xml' should be in 
> sync. Permissions should always be a list. See also my "naming 
> conventions proposal".

Consistency is a good goal, but a secondary one.  The most important 
goal is being able faithfully to dump and reload the configuration, 
against the current form of the tool (backwards compatibility issues 
will creep in the moment we ship the beta, too!)  I don't have 
objections to changes which make the exported XML files more consistent, 
as long as they don't make it harder to export / import the individual 
files.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver at zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com


More information about the Zope-CMF mailing list