[Zope-CMF] Re: [CMF 2.1] FSPageTemplate & Unicode

Martin Aspeli optilude at gmx.net
Sat Jan 6 17:22:22 EST 2007


Okay, spoke to Philipp on IRC and he asked me to relay his opinions on 
some of this:

  - CMF tools ought not to depend on acquiring things from 'self' if at 
all possible.

  - TTW code will need aq contexts for security. However, it makes sense 
for getToolBy(Interface)Name() to handle this.

  - Non-TTW code probably shouldn't need aq contexts.

  - Registering the portal as a utility that can be obtained by 
getUtility(IPortalRoot) is pretty good practice; in my estimation, that 
should solve all the use cases for utilities where acquisition is used 
now and where we're not really after an adapter, view.

  - Using component registries would be bad in terms of maintenance; in 
my own opinion, aq-wrapping when it may not be needed may lead to 
headaches later as well.

Also, in my own opinion, why don't we keep getToolByName() (since it's 
so incredibly prevalent) and just let it handle dotted interface names 
as well? The chances of a name clash are minute, and we can at a later 
stage deprecate the non-dotted names. I say this because (a) 
getToolByInterfaceName() is long :) and (b) it's one more thing to 
remember and (c) everyone's already using getToolByName().

Martin



More information about the Zope-CMF mailing list