Re: [Zope-dev] zope.globalrequest?

2009-01-27 Thread Andreas Zeidler
Roger Ineichen wrote: > I see your point. I'm not saying that this is bad in general. > Probably "when used in moderation" is the right concept for this > package ;-) and it wasn't written with anything else in mind -- merely for the odd case when you need a request object, but none has been pass

Re: [Zope-dev] zope.globalrequest?

2009-01-22 Thread Benji York
On Mon, Jan 19, 2009 at 10:07 AM, Martijn Faassen wrote: > I guess I might've been able to use the interaction directly in Zope 3's case > and I shall study that. I suspect you already know the mechanics of getting the request from the interaction, but for the others, here's a code snippet that d

Re: [Zope-dev] zope.globalrequest?

2009-01-21 Thread Roger Ineichen
Hi Martijn > Betreff: Re: [Zope-dev] zope.globalrequest? > > Hi there, > > Roger Ineichen wrote: > [snip] > > Why should someone use a global request if he has a request > available? > > This package does nothing else then offer a request if non is > >

Re: [Zope-dev] zope.globalrequest?

2009-01-19 Thread Marius Gedminas
On Mon, Jan 19, 2009 at 09:24:09AM -0800, Stephan Richter wrote: > On Monday 19 January 2009, Christian Theune wrote: > > Using the 'reversal of dependency' (not sure whether this is the > > accurate English term) > > I think it is called "dependency injection". There's the Dependency Inversion P

Re: [Zope-dev] zope.globalrequest?

2009-01-19 Thread Dieter Maurer
Christian Theune wrote at 2009-1-19 17:13 +0100: > ... >> You could use the same arguments with respect to the global "site" ;-) >> But few people in Zope 3 land separate "site" dependent and "site" >> independent code despite some cases where the global "site" does >> make problems. > >Using the '

Re: [Zope-dev] zope.globalrequest?

2009-01-19 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Stephan Richter wrote: > On Monday 19 January 2009, Christian Theune wrote: >> Using the 'reversal of dependency' (not sure whether this is the >> accurate English term) > > I think it is called "dependency injection". I think maybe "inversion" is th

Re: [Zope-dev] zope.globalrequest?

2009-01-19 Thread Christian Theune
On Mon, 19 Jan 2009 09:24:09 -0800 Stephan Richter wrote: > On Monday 19 January 2009, Christian Theune wrote: > > Using the 'reversal of dependency' (not sure whether this is the > > accurate English term) > > I think it is called "dependency injection". Thanks. Now, that you mention it ... C

Re: [Zope-dev] zope.globalrequest?

2009-01-19 Thread Stephan Richter
On Monday 19 January 2009, Christian Theune wrote: > Using the 'reversal of dependency' (not sure whether this is the > accurate English term) I think it is called "dependency injection". Regards, Stephan -- Stephan Richter Web Software Design, Development and Training Google me. "Zope Stephan R

Re: [Zope-dev] zope.globalrequest?

2009-01-19 Thread Christian Theune
On Sun, 18 Jan 2009 20:29:40 +0100 "Dieter Maurer" wrote: > Tres Seaver wrote at 2009-1-18 11:38 -0500: > > ... > >I don't actually know how this package fits in with either Z2 or > >Z3: Z2 apps are always able to acquire the request, > > This is not the case for "localsitemanager" delivered lo

Re: [Zope-dev] zope.globalrequest?

2009-01-19 Thread Martijn Faassen
Hi there, Roger Ineichen wrote: [snip] > Why should someone use a global request if he has a request > available? This package does nothing else then offer a request > if non is available. And if you need a request if non is available > there is something wrong with the application design. Or bet

Re: [Zope-dev] zope.globalrequest?

2009-01-19 Thread Martijn Faassen
Andreas Jung wrote: > On 17.01.2009 8:39 Uhr, Dieter Maurer wrote: [snip] >> It is good to be able to access both "site" and "request" in >> a standard way. > > And it similiar accessing the current transaction using > > import transaction > tx = transaction.get() > > So: +1 +1 too. For Zope 2

Re: [Zope-dev] zope.globalrequest?

2009-01-19 Thread Martijn Faassen
Hi there, Oh joy, a naming discussion. :) A namespace isn't a framework. Be careful we don't start pretending that the zope.* namespace is a framework. If you start judging which packages belong in the zope.* namespace and which are not, what standards are really being used? The only standard

Re: [Zope-dev] zope.globalrequest?

2009-01-18 Thread Dieter Maurer
Tres Seaver wrote at 2009-1-18 11:38 -0500: > ... >I don't actually know how this package fits in with either Z2 or Z3: Z2 >apps are always able to acquire the request, This is not the case for "localsitemanager" delivered local utilities and we therefore have had several problems. > while Z3 ap

Re: [Zope-dev] zope.globalrequest?

2009-01-18 Thread Dieter Maurer
Roger Ineichen wrote at 2009-1-18 13:04 +0100: > ... >> IMHO, it is not an anti-pattern: >> >>We have a global "site" why should we not have a global request? >> >>When Zope is used as a Web Application Server, it is quite >>natural to expect a request. > >I'm fine with the zope.globa

Re: [Zope-dev] zope.globalrequest?

2009-01-18 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > > I don't actually know how this package fits in with either Z2 or Z3: Z2 > apps are always able to acquire the request, while Z3 apps use the > "separation of concerns" pattern I just outlined. I've never wanted a > 'get_request' method in "prod

Re: [Zope-dev] zope.globalrequest?

2009-01-18 Thread Wichert Akkerman
Previously Tres Seaver wrote: > I don't actually know how this package fits in with either Z2 or Z3: Z2 > apps are always able to acquire the request, while Z3 apps use the > "separation of concerns" pattern I just outlined. I've never wanted a > 'get_request' method in "production" code: I woul

Re: [Zope-dev] zope.globalrequest?

2009-01-18 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Laurence Rowe wrote: > Roger Ineichen wrote: > >> just a sample; >> In my point of view an application like a wiki or forum etc. >> should get developed as a python application without to require >> a global request because it's just a (MVC) model par

Re: [Zope-dev] zope.globalrequest?

2009-01-18 Thread Laurence Rowe
Roger Ineichen wrote: >> The most convincing reason for me to persevere with the >> current pattern of views is that it offers the possibility of >> adaption on the request. >> This is something that repoze.bfg is exploring and I think >> could be helpful, for instance registering separate vie

Re: [Zope-dev] zope.globalrequest?

2009-01-18 Thread Roger Ineichen
Betreff: Re: [Zope-dev] zope.globalrequest? > > Roger Ineichen wrote: > > > just a sample; > > In my point of view an application like a wiki or forum etc. > > should get developed as a python application without to require a > > global request because it'

Re: [Zope-dev] zope.globalrequest?

2009-01-18 Thread Laurence Rowe
Roger Ineichen wrote: > just a sample; > In my point of view an application like a wiki or forum etc. > should get developed as a python application without to require > a global request because it's just a (MVC) model part. There should > never be a request involved. If such a wiki needs a "last

Re: [Zope-dev] zope.globalrequest?

2009-01-18 Thread Roger Ineichen
Hi Andi > Betreff: Re: [Zope-dev] zope.globalrequest? > > Roger Ineichen wrote: > > I don't say that this is bad in general. I just say that if > you build > > an application based on zope.globalrequest, this is a > totaly different > > base concept how

Re: [Zope-dev] zope.globalrequest?

2009-01-18 Thread Andreas Zeidler
Roger Ineichen wrote: > I don't say that this is bad in general. I just say that if > you build an application based on zope.globalrequest, this > is a totaly different base concept how you will develop > applications like we do now. And you have to pay the price > with a complex test setup. it's

Re: [Zope-dev] zope.globalrequest?

2009-01-18 Thread Roger Ineichen
Hi Dieter > Betreff: Re: [Zope-dev] zope.globalrequest? > > Christian Theune wrote at 2009-1-16 09:06 +0100: > >I noticed 'zope.globalrequest' on the PyPI RSS feed today and wonder > >about it. IMHO this implements an anti-pattern in an official way > >wi

Re: [Zope-dev] zope.globalrequest?

2009-01-17 Thread Dieter Maurer
Martin Aspeli wrote at 2009-1-17 11:36 +: >Dieter Maurer wrote: >> Christian Theune wrote at 2009-1-16 09:06 +0100: >>> 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 need

Re: [Zope-dev] zope.globalrequest?

2009-01-17 Thread Robert Niederreiter
Hi, Am Samstag, den 17.01.2009, 11:36 + schrieb Martin Aspeli: > Dieter Maurer wrote: > > Christian Theune wrote at 2009-1-16 09:06 +0100: > >> I noticed 'zope.globalrequest' on the PyPI RSS feed today and wonder > >> about it. IMHO this implements an anti-pattern in an official way > >> witho

Re: [Zope-dev] zope.globalrequest?

2009-01-17 Thread Martin Aspeli
Dieter Maurer wrote: > Christian Theune wrote at 2009-1-16 09:06 +0100: >> 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. > > IMHO, it is not an

Re: [Zope-dev] zope.globalrequest?

2009-01-16 Thread Dieter Maurer
Chris Withers wrote at 2009-1-16 17:00 +: > ... >Personally, I've always seen zope.* as being usable on their own or with >either Zope 2 or Zope 3. It seems this package is only usefully >targetted at zope2 I am not so sure. Accessing the request in a simple standard way may be useful whene

Re: [Zope-dev] zope.globalrequest?

2009-01-16 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 17.01.2009 8:39 Uhr, Dieter Maurer wrote: > Hanno Schlichting wrote at 2009-1-16 10:14 +0100: >> Christian Theune wrote: >>> I noticed 'zope.globalrequest' on the PyPI RSS feed today and wonder >>> about it. IMHO this implements an anti-pattern in a

Re: [Zope-dev] zope.globalrequest?

2009-01-16 Thread Dieter Maurer
Hanno Schlichting wrote at 2009-1-16 10:14 +0100: >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. > >The discussion for

Re: [Zope-dev] zope.globalrequest?

2009-01-16 Thread Dieter Maurer
Christian Theune wrote at 2009-1-16 09:06 +0100: >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. IMHO, it is not an anti-pattern: We have a globa

Re: [Zope-dev] zope.globalrequest?

2009-01-16 Thread Martin Aspeli
Benji York wrote: >> And what about zope.agxassociation, zope.bforest, zope.bobo, >> zope.generic, zope.ucol, zope.wfmc and zope.xmlpickle to name a few of >> the more than 30 packages already in the zope.* namespace which are >> neither part of any Zope release nor are likely to ever be? > > Som

Re: [Zope-dev] zope.globalrequest?

2009-01-16 Thread Martin Aspeli
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

Re: [Zope-dev] zope.globalrequest?

2009-01-16 Thread Andreas Zeidler
Stephan Richter wrote: > Then let's just mention its intended use in Zope 2/Plone in the documentation > and go on with life. i've just added such a note and made a fresh release — http://pypi.python.org/pypi/zope.globalrequest/1.0a2 best regards, andi -- zeidler it consulting - http://zitc

Re: [Zope-dev] zope.globalrequest?

2009-01-16 Thread Benji York
On Fri, Jan 16, 2009 at 3:06 PM, Hanno Schlichting wrote: > Jens Vagelpohl wrote: >> Even though there is no official "dictator" for each of those common >> namespaces like zope, z3c, plone, archetypes, etc I do see value in at >> least attempting to be careful when choosing the namespace. Agreed

Re: [Zope-dev] zope.globalrequest?

2009-01-16 Thread Hanno Schlichting
Jens Vagelpohl wrote: > On Jan 16, 2009, at 18:25 , Hanno Schlichting wrote: > >> The concept of >> giving SVN repositories any kind of quality level aspect failed in the >> same way. Dependencies are specified in the setup.py and egg metadata. >> Quality is judged by who has written some code, nu

Re: [Zope-dev] zope.globalrequest?

2009-01-16 Thread Stephan Richter
On Friday 16 January 2009, Hanno Schlichting wrote: > 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. > > The discuss

Re: [Zope-dev] zope.globalrequest?

2009-01-16 Thread Stephan Richter
On Friday 16 January 2009, Andreas Jung wrote: > On 16.01.2009 15:51 Uhr, Chris Withers wrote: > > Hanno Schlichting wrote: > >> Community" in its entirety. Inventing a zope2 or z2c namespace is a poor > >> choice. > > > > Why? That seems like the perfect namespace for this particular package... >

Re: [Zope-dev] zope.globalrequest?

2009-01-16 Thread Jens Vagelpohl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Jan 16, 2009, at 18:25 , Hanno Schlichting wrote: > The concept of > giving SVN repositories any kind of quality level aspect failed in the > same way. Dependencies are specified in the setup.py and egg metadata. > Quality is judged by who has wri

Re: [Zope-dev] zope.globalrequest?

2009-01-16 Thread Hanno Schlichting
Chris Withers wrote: > Andreas Jung wrote: >> Namespaces are like dust and smoke. We already have enough (pointless) >> namespaces. So let's stick with zope.* and z3c.* for Zope related packages. > > Why note merge those two into one then? Merging namespaces just causes work without any benefit.

Re: [Zope-dev] zope.globalrequest?

2009-01-16 Thread Chris Withers
Andreas Jung wrote: > Namespaces are like dust and smoke. We already have enough (pointless) > namespaces. So let's stick with zope.* and z3c.* for Zope related packages. Why note merge those two into one then? Personally, I've always seen zope.* as being usable on their own or with either Zope

Re: [Zope-dev] zope.globalrequest?

2009-01-16 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 16.01.2009 15:51 Uhr, Chris Withers wrote: > Hanno Schlichting wrote: >> Community" in its entirety. Inventing a zope2 or z2c namespace is a poor >> choice. > > Why? That seems like the perfect namespace for this particular package... > Namespaces

Re: [Zope-dev] zope.globalrequest?

2009-01-16 Thread Chris Withers
Hanno Schlichting wrote: > Community" in its entirety. Inventing a zope2 or z2c namespace is a poor > choice. Why? That seems like the perfect namespace for this particular package... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk __

Re: [Zope-dev] zope.globalrequest?

2009-01-16 Thread Chris McDonough
Hanno Schlichting wrote: > 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. > > The discussion for this happened on the

Re: [Zope-dev] zope.globalrequest?

2009-01-16 Thread Robert Niederreiter
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

Re: [Zope-dev] zope.globalrequest?

2009-01-16 Thread Hanno Schlichting
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. The discussion for this happened on the plone-dev mailing list. The reason

[Zope-dev] zope.globalrequest?

2009-01-16 Thread Christian Theune
Hi, 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. Christian -- Christian Theune · c...@gocept.com gocept gmbh & co. kg · forsterstraße 29 · 06112 h