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
- 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().
Zope-CMF maillist - Zope-CMF@lists.zope.org
See http://collector.zope.org/CMF for bug reports and feature requests