From the standpoint of trying to prevent reinventing wheels all over the place it sounds like a good idea to re-use a Zope 3 component. However, beware of backwards-compatibility in terms of software and in terms of persistent data generated by the existing version. Like Tres always says, "persistence means always having to say you're sorry".

Essentially, if you can do it while retaining backwards compatibility I'd be all for it.

Hmm, this depends on how non-trivial or otherwise the upgrade steps can be, and what backwards compatibility is acceptable.

I'd propose the following:

- the existing uid classes remain with deprecation warnings until they can be removed, and also have a big "upgrade" button in the ZMI that turns them into the "new tool/utility" and imports existing data - once upgraded, IObjectAdded events fired by importing new content convert and register uids in the new scheme - instead of using the catalog, the "tool/utility" would actually retrieve the objects by oid, and then check permissions etc directly to mimic the CMF catalog (expires, allowedRolesAndUsers etc) - for BBB (default), the "tool/utility" would additionally annotate the objects with UidAnnotations (as currently) and these can be indexed in the catalog. this could be turned off by not registering an adapter (it's only needed for BBB I think)

I suppose the slight deviation from BBB is that if someone is using a custom catalog (for example a "day-of-week-to-show" flag to provide random search results), they'll also need to provide some sort of customisation when objects are fetched by uid to get the same thing to happen. Given the number of people actually using CMFUid and the obscurity of the use-case, I think this might be acceptable to just document (and/or provide some sort of adapter-based customisation so it's easy).

Does that sound BBB enough? I can't think of anything else that might break but that's what tests are for right :-) ?


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

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to