[Zope] efficient internal redirect
Alexander Staubo
alex@mop.no
Mon, 13 Mar 2000 13:59:59 +0100
> -----Original Message-----
> From: cmsakh@firewall.mop.no
> [mailto:cmsakh@firewall.mop.no]On Behalf Of
> Andy Heath
> Sent: Monday, March 13, 2000 1:04 PM
> To: alex
> Cc: zope@zope.org
> Subject: Re: [Zope] efficient internal redirect
[snip]
> You have misunderstood what I'm asking completely (probably my fault).
If I were you, I'd definitely go over that original post of yours again
and consider how it can be rephrased -- because from what you say, this
is how I see your problem:
1) Pages within Zope
2) External sites or pages that link to these pages
3) You'd like the underlying pages to be separate from the URLs to which
these external pages refer, so that you can move the actual data around.
4) You want this to perform really well.
From this specification, it sounds like, aside from the marginal
performance loss incurred, you should be able to make do by using plain
old HTTP redirection. Did I get any part wrong?
You could use a kind of hub method like so:
<dtml-let Mappings="{
'Downloads': PARENTS[-1].Downloads,
'Foo': PARENTS[-1].Bar,
'Snarf': PARENTS[-1].Smurf.Snark
}">
<dtml-var "Mappings[REQUEST.Where]">
</dtml-let>
Assuming the method is called /Hub, then you can invoke it like so:
http://www.andysserver.com/Hub?Where=Snarf
and it will display, in this case, the object "Snarf" in the root-level
"Smurf" container. While this works (you can also use a TinyTable
instead of a dictionary), this has a few gotchas, such as causing
trouble with proxy roles. No HTTP redirects, but not as elegant.
Oh, and did I mention how absolutely marvellous the Redirector product
is? ;-)
--
Alexander Staubo
http://alex.mop.no