[Zope3-dev] Re: URLs & Paths
Jim Fulton
jim@zope.com
Mon, 17 Dec 2001 16:09:32 -0500
sean.bowman@acm.org wrote:
>
> hi,
>
> > To get the contact "view" presentation, you'd use:
> >
> > .../aContact/view;view
> >
> > where here the name "view" names both a specific presentation
> > component and the presentation namespace.
>
> I don't quite understand this. Why is the "view" there twice? And what
> exactly is a "presentation namespace?" The word "namespace" makes me
> think of referring to names in the view component that are defined in the
> content, but that doesn't seem to be what's going on here.
This is a bad example, which is why I'm updating the
tutorial to use a different view name. :)
In addition, the tutorial will also be updated so that
we no longer have to specify a namespace for contacts in
URLS.
In the future, the example will be:
.../aContact/info
which is equivalent to:
.../aContact/info;view
which is equivalent to:
.../aContact/info;ns=view
> > Let me try to clarify. To me, "acquire" means find something in a
> > place/context. Component lookup is always placeful.
>
> I don't exactly understand this, either; there seems to be some tension
> between the use of ";acquire" as in ".../aContact/foo;acquire" and the
> statement above.
The expression:
.../aContact/info;acquire
would look for an info object in a folder (directly or indirectly)
containing aContact. The acquisition namespace, when used with
content will search the content namespace.
This is in contrast to:
.../aContact/info;view
which looks for an info presentation component (in a presentation
service in a service manager) in a folder (directly or indirectly)
containing aContact.
> If "foo" is a component and component lookup is
> placeful, why do we have to add an explicit instruction to ";acquire" ?
"acquire" searches content, but "view" searches presentation components.
Buth searches use acquisition in the sense that they search am acquisition
context. They search the context in different ways.
Jim
--
Jim Fulton mailto:jim@zope.com Python Powered!
CTO (888) 344-4332 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org