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


Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to