[Zope-CMF] [dev] Should portal_setup be registered as utility?
yuppie
y.2008 at wcm-solutions.de
Thu Nov 20 06:42:43 EST 2008
Dieter Maurer wrote:
> yuppie wrote at 2008-11-18 12:00 +0100:
>> Dieter Maurer wrote:
>>> If they would, local utilities were much nearer to tools and
>>> the transition would be facilitated.
>> They would be nearer to tools, but also more distant from zope 3
>> utilities. I doubt that would really be a win.
>
> Then, maybe, Zope 3 utilities are inadequate at many places in
> to Zope 2 world: e.g. any tool that uses TALES expressions may
> want to access the (current, of course) request -- especially
> when they are destined for user interaction (as actions are).
I agree. Utilities are inadequate for user interaction. Views should be
used instead.
We don't need the request for managing TALES expressions inside an
utility. The request is only needed if we *use* the expressions, and
that should be done in view code, not in utilities.
Several tool methods have to be replaced by view code before we can
register all tools as utilities.
> In view of this, one can understand that Plone has problems with
> the "setup_tool" utility registration.
The setup tool is responsible for managing configuration data. I can't
see a need to care about the request in that context.
Cheers, Yuppie
More information about the Zope-CMF
mailing list