Hi Charlie!

Charlie Clark wrote:
> Am 26.01.2011, 16:50 Uhr, schrieb yuppie<y.2...@wcm-solutions.de>:
>> I'm not happy with the current state of CMF trunk. Especially the
>> syndication related changes cause trouble in different ways:
>> - SyndicationInformation was replaced by SyndicationInfo without
>> providing migration code. Local syndication settings get lost in
>> existing sites.
>> - In the ZMI the SyndicationTool no longer has a tab that allows to
>> inspect and modify tool settings. The form that replaces the ZMI tab is
>> broken: It uses datetime objects instead of DateTime objects and mixes
>> them with existing DateTime settings.
>> Last week I reviewed parts of the new code and fixed some small issues.
>> But the bigger issues still exist. Based on what I encountered I wrote
>> this small guide:
>> http://svn.zope.org/*checkout*/CMF/trunk/CODINGSTYLE.txt
>> Please keep the the trunk stable and use your own branch for unfinished
>> changes.
> I think this applies almost entirely to my work on browser views. Yuppie's
> been in touch with me privately but I haven't found time to do the tidying
> up.
> I agree with nearly all the points. I'm not certain that SchemaAdapters
> are always necessary.

zope.formlib is not made for DateTime values and encoded strings. So you 
*always* have to make sure these values are converted correctly. And it 
is hard to do that inside the form code. Obviously you did have trouble 
to get it right that way. After I started using adapters for the edited 
objects I had much less trouble using formlib. Of course you don't need 
an adapter if your objects already provide the right interface.

And one more benefit: Inside the form code you can completely ignore the 
old-fashioned implementation of the edited objects and write nice modern 

> In my defence I hope it's worth noting that we now
> have tests for a heap of stuff in CMFDefault which previously didn't exist.
> Regarding SyndicationInfo - I'd appreciate any pointers on writing a
> migration step. Given the hopelessly outdated state of the current
> implementation I'm not convinced anyone will need to do the migration

What was wrong with the old implementation? I never had trouble using 
the old configuration objects and forms. The old RSS template didn't 
work for me, but that's a different issue.

> but
> then, of course, one of the aims of CMFDefault is to provide exactly this
> kind of example.

I'm sure I'm not the only one who has existing CMF sites with 
SyndicationInformation objects in it. Making sure these sites can be 
upgraded without trouble is essential. And not a nice to have extra. 
Especially if the old implementation did work and the new one doesn't 
provide any new features.


Zope-CMF maillist  -  Zope-CMF@zope.org

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests

Reply via email to