[Zope-CMF] Re: modifying TypeInformation's properties

Tres Seaver tseaver at zope.com
Tue Sep 7 09:16:15 EDT 2004


yuppie wrote:
> Hi Tres!
> 
> 
> Tres Seaver wrote:
> 
>>>> If products use additional properties, other products have to care 
>>>> about providing them.
>>
>>
>> Nope, not if they are "optional";  only the code which sets up the 
>> site should care about them.  If we add an extensible mechanism for 
>> creating extra properties to CMFSetup, then all the policy moves to 
>> the CMFSetup profile, where it belogs.
> 
> 
> Well. That's the part of CMFSetup I still don't understand. How is "the 
> code which sets up the site" created? Separating configuration from code 
> is the Right Thing. But how does that help to resolve dependencies 
> between products and the configurations they require?
> 
> Just an example: The "default" profile doesn't include CMFCalendar 
> configuration. How would we use CMFSetup for a site that needs calendar 
> features? Do we download a "CMF_with_calendar" profile? Or do we combine 
> a "default" profile with a "calendar_support" profile? And if yes: How?

OK, here is how I see this:

   - The CMFSetup product itself is mostly "mechanism", not "policy";
     it contains a default profile primarily to allow others to see how
     profiles look.

   - Add-on products (like CMFCalendar) can play with CMFSetup in two
     ways:

       o As "mechanism", by registering additional import / export steps
         (making them available to the setup tool, and thus able to be
         included in profiles).  CMFCalendar needs to register export and
         import steps for the calendar tool, in order to fulfill its
         "didactic" role here.

       o As "policy", by including profiles.  We should probably include
         a sample profile in CMFCalendar showing what a
         "site-with-calendar" export looks like, but that is less
         important than registering the steps.

     I would expect most "add-on" products supplying tools to use the
     first, but only those representing "finalized sites" (e.g., the
     "customer-specific" product in a consulting gig, or perhaps
     Plone itself, as a "standalone" application).

   - If we extend TI objects with arbitrary policy, that is "mechanism";
     CMFSetup will just record such properties (on export) in the XML
     file for types, and recreate them (on import).  Configurations which
     rely on such properties will need to supply a profile which contains
     them;  the most obvious way to create such a profile is by adding
     them manually or programmatically to the site and then re-exporting
     it.


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


More information about the Zope-CMF mailing list