[Zope] Simplifying complex contexts/urls

Chris Fassnacht cfassnacht@ssc.wisc.edu
Tue, 14 Sep 1999 09:27:16 -0500


Michel,

Thanks for the advice.  I finally figured out how to stop my "leaking" with
the judicious use of the <dtml-var BASE> tag in my path generating
statements.  I probably should have figured this out myself before posting
to the list.  Sorry to be asking such elementary questions.

Chris

> -----Original Message-----
> From: michel@localhost.localdomain
> [mailto:michel@localhost.localdomain]On Behalf Of Michel Pelletier
> Sent: Monday, September 13, 1999 6:09 PM
> To: cfassnacht@ssc.wisc.edu
> Cc: zope@zope.org
> Subject: Re: [Zope] Simplifying complex contexts/urls
>
>
> Chris Fassnacht wrote:
> >
> > I'm developing a site with Zope that has a lot of
> interlinking between
> > objects, and after clicking around for a while, the context
> (aka, the url
> > path in the browser's address display) gets really long and
> complex.  So
> > far, I haven't had any problems with it, but I do have two concerns.
> >
> > 1. It starts to look pretty ungainly.  This doesn't bother
> me too much, but
> > I don't know how users will respond.
> >
> > 2. There must be some limit on the length of the allowable
> url in the
> > browser's display.  What are the chances that an extended session of
> > clicking around will run into that limit?
>
> Who knows?  I don't think the HTTP spec has a limit on URL
> length, it's
> probably implimentation defined.
>
> > So, I'm wondering if there's some way to automatically
> simplify a path to
> > its most elemental form.  For example,
> > www.mysite.edu/main/topicA/topicB/topicC/topicA/topicB becomes
> > www.mysite.edu/main/topicA/topicB.
>
> In your app, they may produce the same results, but these are two
> different scenarios.  These requests both have different 'acquisition
> paths' which will cause different things to happen (for example, even
> though two images may be the same image in the two paths, they would
> both have different absolute_url values, because absolute_url is built
> from the acquisition path).
>
> I would suggest not allowing your application to build such complex
> queries if they are essentialy redundant and you are not using any
> particular feature that redundent paths give you (I can't think of one
> off the top of my head...).  You might end up in a situation like:
>
> http://www.mysite.com/main/topicA/topicA/topicA/topicA/...
>
> Which can happen, but only if you build your app to 'leak' path
> elements.
>
> -Michel
>