[Zope-dev] zope.globalrequest?

Robert Niederreiter rnix at squarewave.at
Fri Jan 16 04:15:36 EST 2009


Hi,

Am Freitag, den 16.01.2009, 09:06 +0100 schrieb Christian Theune:
> Hi,
> 
> I noticed 'zope.globalrequest' on the PyPI RSS feed today and wonder
> about it. IMHO this implements an anti-pattern
>From application POV the request is a singleton, and the only kind of
object which acts always in the same way in an Application Server. Since
in Zope utilities represents singletons, the request might be provided
global via an utility.

>>> req = getUtility(IRequest)

Some month ago i ran into the same problem to access the request out of
another global utility. the fact that the request is not accessable
global results then in ugly API signatures and difficult to re-use
components.

Robert



More information about the Zope-Dev mailing list