Hash: SHA1

On 09/04/2012 02:59 AM, yuppie wrote:
> Hi!
> In CMF 2.3 (beta) all core tools can be looked up using getUtility for
>  mandatory tools or queryUtility for optional tools. That's a big step
>  forward, but there are still some places where we depend on tool 
> characteristics:
> 1.) Bootstrapping: ==================
> Importing .zexp files or upgrading old sites some tools are used
> before they are registered as utilities.

Upgrades should always ensure that the registry is correct first.

> Currently there are fallbacks in place that use the old tool lookup. I
>  guess some events need to be disabled for .zexp imports.

I'd rather not add any cruft to support .zexp imports, which have seemed
fundamentally broken to me for a long time.

> 2.) Site root lookup: =====================
> In several tools we still assume aq_parent(aq_inner(self)) is the 
> portal. Or other code uses the tool as context object, expecting root
>  and request in its acquisition chain.
> These should be identified and replaced by 
> getUtility(IURLTool).getPortalObject() or other suitable code.

Maybe we could add a convenience API for that?

> 3.) Action providers: =====================
> Action providers are still registered and looked up by ID.
> Most Actions were moved to the Actions Tool. Only two 2 special Action
>  providers are left: Types Tool and Workflow Tool.
> I have no plans to convert that registry to something based on utility
>  lookup. I guess it would be better to create specialized 'object' and
>  'workflow' categories that are linked to the Types Tool and the
> Workflow Tool. But that's a different story.
> 4.) Skins: ==========
> The Skins Tool lookup is based on the getSkinsFolderName method.
> If there are no objections, I'll replace that by 
> queryUtility(ISkinsTool) without providing any backward compatibility
>  code for getSkinsFolderName.

+1.  Thanks for the analysis.

- -- 
Tres Seaver          +1 540-429-0999          tsea...@palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/


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

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

Reply via email to