[Zope-CMF] Re: [dev] GenericSetup: more refactoring - a small proposal

yuppie y.2005- at wcm-solutions.de
Tue Nov 15 13:22:12 EST 2005


Hi Florent!


Thanks for the feedback.

Florent Guillaume wrote:
> yuppie wrote:
>> I can see use cases like that, but I'd prefer a more decentralized 
>> solution. Using the setup tool for tasks like that makes it too 
>> complex and if I want to modify a single tool I don't want to switch 
>> to the setup tool and perform many steps to get my import. Possible 
>> alternatives:
>>
>> - A modified tool factory could allow adding pre-configured tools in a 
>> similar way as the 'CMF Action' and '* Type Information' factories on 
>> the trunk (that allow to choose presettings from profiles).
>>
>> - Tools could have an import/export tab that allows to load settings 
>> from an XML file.
> 
> I don't understand, in the CMF 1.5 framework I'm using that doesn't make 
> sense. Things go through portal_setup. Maybe in CMF 2.0 and the updated 
> GenericSetup that's different but I'm not there yet.

The new I/O adapters don't depend on the setup tool. Using the setup 
tool is only necessary if we want to use the snapshots in it. The add 
form for TypeInfos in CMF 2.0 is an example how a modified tool factory 
could work.

> If individual tools have Export/Import tabs that do the I/O, fine, but I 
> don't see any code that does that today. You're proposing that we modify 
> every single tool's implementation, instead of having things in 
> portal_setup?

Yes. But the code could be quite generic. AFAICS the only change that 
would be necessary in every single tool's implementation (or in a shared 
base class) is adding the new tab to 'manage_options'. Everything else 
could be a shared view.

Anyway I've put this proposal on hold. No need to find a consensus now.


Cheers,

	Yuppie



More information about the Zope-CMF mailing list