[Zope-dev] zope.globalrequest?

Martin Aspeli optilude+lists at gmail.com
Fri Jan 16 21:31:17 EST 2009


Christian Theune wrote:

> I noticed 'zope.globalrequest' on the PyPI RSS feed today and wonder
> about it. IMHO this implements an anti-pattern in an official way
> without a warning that this needs to be handled with care.

First of all, I actually quite like this pattern. It's commonly used in 
other frameworks, e.g. Pylons, where the request is a pseudo-global. The 
utility pattern that Robert suggested would also work, though it'd be 
harder to implement I think.

Secondly, though, I think this is a poor choice of namespacing. 
Namespaces ought to say something about who the package is controlled 
by. zope.* implies the package is controlled by the Zope project. I 
didn't see any discussion about this, so at best it seems like a bit of 
"namespace creep".

Now, I understand that the intention was to make this easier to swallow 
should we want to include it in the future. That's certainly a sensible 
thing to think about, but since this package seems to have taken the 
Zope maintainers a bit by surprise, it would've been better to either 
release it under a different namespace with different connotations, or 
at least discuss its merits and naming here before making the release.

Cheers,
Martin

-- 
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book



More information about the Zope-Dev mailing list