Placeful and Placeless definitions (was Re: [Zope3-dev] Second ZOPE 3 mini- NEWSLETTER (and kinda large glossary))

Gary Poster gary@modernsongs.com
02 Nov 2002 10:50:15 -0500


On Fri, 2002-11-01 at 13:20, Tres Seaver wrote:
> On Thu, 2002-10-31 at 11:44, Gary Poster wrote:
> > Point taken: I lost accuracy in my pursuit of friendliness.  Would you
> > buy "reside in the traversable Zope tree"?
> 
> Maybe even "are reached by traversing the Zope object tree", or "having
> traversal context"?

Yes, one of those might be even better: I like door # 2.  OK, folks,
here's my revision.  nitpick away, as it will be in the next newsletter
and in the collected wiki newsletter glossary
(http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/NewsletterGlossary).

May I add, as a precursor, *whew*.

------

Global Service: see *placeless service*.

Local Service: see *placeful service*.

Placeful: An adjective describing an object that has a *traversal
context* in Zope.  For example, an object is placeful if it can be
reached by traversing a URI path, be it "/myObject",
"/myFolder/myObject", "/myFolder/myNonZODBConnection/myObject", or
"/++etc++Services/Packages/default/myErrorService" (the last example is
a hypothetical *placeful service*).  More technically, these objects are
wrapped, mostly invisibly, with one or more "Zope.ContextWrapper"s,
which provide the ability to get contextual information similar to
aq_parent etc. in Zope 2; moreover, following these nested wrappers to
their ultimate (top or root) context must reach the top (root) Zope
object (i.e., the object found by traversing the path "/").  Note that
the correct usage of context wrappers should actually use the methods in
Zope.Proxy.ContextWrapper, which also provide and handle security
proxies.  Opposite of *placeless*.

Placeful Service: a *service* that is *placeful* and is pertinent only
to the Zope traversal branch (or "folder" and all children) in which it
resides.  This usually means that the service resides in the *ZODB* 
(and so is *persistent*). Similar to standard programming "local"
concept of variables in that a placeful service's scope is restricted,
where the scope in this case is the scope of a traversal branch. A
placeful service is usually obtained by using a traversal context to get
it: in Python, after importing Zope.ComponentArchitecture.getService,
one would use 'getService(myTraversalContext, "Events")' to get a
placeful event service, where myTraversalContext is another placeful
object.  Note that if a placeless event service is not installed within
the traversal context, a *placeless service*, if such exists with the
requested name (such as "Events"), will be returned.  Opposite of
*placeless service*.

Placeless: An adjective describing an object that does not have a
traversal context, and usually is not intended to have one.  This
usually means that one cannot traverse to such an object via any URL
path, for instance.  Technically, it also means that these objects do
not have nested "Zope.ContextWrapper"s that resolve eventually and
finally to the root Zope object (i.e., URI path "/") and, in fact, in
all to almost all cases, means that they do not have any ContextWrappers
at all.  Opposite of *placeful*.

Placeless Service: a *service* that is *placeless* and is available to
any object.  This usually means that it does not reside in the *ZODB*
and is not *persistent*--connections to placeless services, therefore,
usually must be made on every Zope startup, and are often controlled
through *ZCML*.  Somewhat similar to standard programming "global"
concept of variables, in that they are not restricted by any scope,
where scope in this case is the scope of traversal context (that is, the
context of where an object is found in Zope via URI path). A placeless
service can be obtained (if one by the requested name is installed) in
Python by importing Zope.ComponentArchitecture.getService and then
calling "getService(None, 'Events')"--that is, the traversal context
(first argument) is None.  Opposite of Placeful.

Service: [TBD.  I guess I will use some friendly massaged version of
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/Service...]

Traversal Context: [TBD again: help?.  After some relatively short
definition we come up with then I probably will put Steve's traversal
analogy up in a link.]

Utility: [TBD friendly massaged version of other glossary definition]

Thanks

Gary