You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Torsten Curdt <tc...@dff.st> on 2001/11/28 13:42:53 UTC

aggregation and redirects

I encountered the following:
                                   request -> [part]
                                  /
-request-> [ ContentAggregation ] -request -> [part]
                                  \
                                   request -> [part]
                                             does a redirect
                                             via Redirector
                                             inside an action

Unfortunately only the aggregated _part_ is redirected.
I would expect a redirect to happen always at root level
of all aggregations.

I've looked into the sitemap.xsl and into the ContentAggregator.
But I have found no way of getting to the (Sitemap)Redirector of the
parts. Maybe we could pass the Redirector to the aggregated parts?
Any idea?

Then we could easily check each part for "hasRedirected"
inside the sitemap. And everything should work as expected.
--
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: aggregation and redirects

Posted by Torsten Curdt <tc...@dff.st>.
[snip]
> The globalRedirect() function works to redirect the entire resource
> all the time.  That way, everybody gets what they want with a simple
> solution that is both semantically correct, and that does not add
> additional complexity to the most complex beast within Cocoon: the
> sitemap.  This way we avoid FS but maintain flexibility with well
> defined contracts.

Sounds reasonable. I'll have look into this...

> > Sorry, I laid the words in your mouth :)
> > (OT: native speakers - is this the correct phrase?)
> The correct phrase is: "I put the words in your mouth"

Doh.. always trust your first guess ;)
--
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: aggregation and redirects

Posted by Klaus Bertram <k....@kbsm.de>.
At 16:06 28.11.2001, Berin wrote:
>Torsten Curdt wrote:
>
>
>>>Hm, nice to hear "you are right", but did I say that? I feel making
>>>this configurable is FS.
>
>Perhaps we need to distinguish the type of redirection we are expecting
>by having two methods on the Redirector object:
>
>redirect()
>globalRedirect()
>
>The only difference is during the aggregation.  If someone is using
>aggregation as a means of keeping menu and content separate on their
>system, they want the redirect to load an entirely different page.
>If the redirect is part of a portal, then only the local piece needs
>to be redirected.
>
>The problem is that the current form of Aggregation is not flexible
>enough to do portal aggregation effectively.
+1 
for make it a little bit more flexible i had posted a patch (2 times the last for about 3 Weeks) for the sidemap to use the select statement in aggregation
i think when in the aggregation select match and action functionality work the need for redirect where small
when out of this components a redirect is invoked that can be seen as a globalRedirect()

>The normal redirect() function works exacly like now (i.e. if the
>resource is global, redirect to a whole new resource, and if a
>resource is a map:part, only the local part is redirected).
>
>The globalRedirect() function works to redirect the entire resource
>all the time.  That way, everybody gets what they want with a simple
>solution that is both semantically correct, and that does not add
>additional complexity to the most complex beast within Cocoon: the
>sitemap.  This way we avoid FS but maintain flexibility with well
>
>defined contracts.
>
>
>
>>Well, alright, this was more a... both have a point so let's make it configurable ;)
>>Sorry, I laid the words in your mouth :)
>>(OT: native speakers - is this the correct phrase?)
>
>
>The correct phrase is: "I put the words in your mouth"
Klaus


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: aggregation and redirects

Posted by Torsten Curdt <tc...@dff.st>.
> > Is your -1 also for the Redirector interface?
> 
> Hm, the Redirector is used directly in the Action interface.
> As I'm still not sure if it is really usefull to have this choice,
> I don't like changing any interface. But you're right, the Redirector
> interface is easier changeable than the Environment. Adding
> a new method to it, should work. 

Ok, have it working here. I only changed the Redirector interface.

Should I commit it to HEAD or are we in a total code freeze until
2.0 final is out?
--
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: aggregation and redirects

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Torsten Curdt wrote:
> 
> > > > Perhaps we need to distinguish the type of redirection we 
> are expecting
> > > > by having two methods on the Redirector object:
> > > >
> > > > redirect()
> > > > globalRedirect()
> > >
> > > But then I need to add globalRedirect() to the Environment 
> interface, too.
> > > Any objections?
> > 
> > As we have discussed last friday, the main goal of an open 
> source project
> > is stable contracts. So currently I'm -1 on changing core interfaces.
> > And remember, we are currently releasing 2.0...
> 
> Hm... I have also a bit mixed feelings about changing the 
> Environment interface.
> Although I think adding globalRedirect(session,uri) or 
> redirect(session,uri,global)
> only to the Redirector interface should not be a big problem.
> 
> (What about sandwich in a new interface so the current interface could
>  remain unchanged?)
> 
> Is your -1 also for the Redirector interface?

Hm, the Redirector is used directly in the Action interface.
As I'm still not sure if it is really usefull to have this choice,
I don't like changing any interface. But you're right, the Redirector
interface is easier changeable than the Environment. Adding
a new method to it, should work. 

Carsten

> --
> Torsten
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: aggregation and redirects

Posted by Torsten Curdt <tc...@dff.st>.
> > > Perhaps we need to distinguish the type of redirection we are expecting
> > > by having two methods on the Redirector object:
> > >
> > > redirect()
> > > globalRedirect()
> >
> > But then I need to add globalRedirect() to the Environment interface, too.
> > Any objections?
> 
> As we have discussed last friday, the main goal of an open source project
> is stable contracts. So currently I'm -1 on changing core interfaces.
> And remember, we are currently releasing 2.0...

Hm... I have also a bit mixed feelings about changing the Environment interface.
Although I think adding globalRedirect(session,uri) or redirect(session,uri,global)
only to the Redirector interface should not be a big problem.

(What about sandwich in a new interface so the current interface could
 remain unchanged?)

Is your -1 also for the Redirector interface?
--
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: aggregation and redirects

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
> -----Original Message-----
> From: Torsten Curdt [mailto:tcurdt@dff.st]
> Sent: Thursday, November 29, 2001 1:40 PM
> To: cocoon-dev@xml.apache.org
> Subject: RE: aggregation and redirects
>
>
> > Perhaps we need to distinguish the type of redirection we are expecting
> > by having two methods on the Redirector object:
> >
> > redirect()
> > globalRedirect()
>
> But then I need to add globalRedirect() to the Environment interface, too.
> Any objections?

As we have discussed last friday, the main goal of an open source project
is stable contracts. So currently I'm -1 on changing core interfaces.
And remember, we are currently releasing 2.0...

Regards
Carsten
> --
> Torsten
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: aggregation and redirects

Posted by Torsten Curdt <tc...@dff.st>.
> Perhaps we need to distinguish the type of redirection we are expecting
> by having two methods on the Redirector object:
> 
> redirect()
> globalRedirect()

But then I need to add globalRedirect() to the Environment interface, too.
Any objections?
--
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: aggregation and redirects

Posted by Berin Loritsch <bl...@apache.org>.
Torsten Curdt wrote:


>>Hm, nice to hear "you are right", but did I say that? I feel making
>>this configurable is FS.

Perhaps we need to distinguish the type of redirection we are expecting
by having two methods on the Redirector object:

redirect()
globalRedirect()

The only difference is during the aggregation.  If someone is using
aggregation as a means of keeping menu and content separate on their
system, they want the redirect to load an entirely different page.
If the redirect is part of a portal, then only the local piece needs
to be redirected.

The problem is that the current form of Aggregation is not flexible
enough to do portal aggregation effectively.

The normal redirect() function works exacly like now (i.e. if the
resource is global, redirect to a whole new resource, and if a
resource is a map:part, only the local part is redirected).

The globalRedirect() function works to redirect the entire resource
all the time.  That way, everybody gets what they want with a simple
solution that is both semantically correct, and that does not add
additional complexity to the most complex beast within Cocoon: the
sitemap.  This way we avoid FS but maintain flexibility with well

defined contracts.



> Well, alright, this was more a... 
> both have a point so let's make it configurable ;)
> 
> Sorry, I laid the words in your mouth :)
> (OT: native speakers - is this the correct phrase?)


The correct phrase is: "I put the words in your mouth"



-- 

"Those who would trade liberty for
  temporary security deserve neither"
                 - Benjamin Franklin


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: aggregation and redirects

Posted by Torsten Curdt <tc...@dff.st>.
> > > > I encountered the following:
> > > >                                    request -> [part]
> > > >                                   /
> > > > -request-> [ ContentAggregation ] -request -> [part]
> > > >                                   \
> > > >                                    request -> [part]
> > > >                                              does a redirect
> > > >                                              via Redirector
> > > >                                              inside an action
> > > > 
> > > > Unfortunately only the aggregated _part_ is redirected.
> > > > I would expect a redirect to happen always at root level
> > > > of all aggregations.
> > > > 
> > > > I've looked into the sitemap.xsl and into the ContentAggregator.
> > > > But I have found no way of getting to the (Sitemap)Redirector of the
> > > > parts. Maybe we could pass the Redirector to the aggregated parts?
> > > > Any idea?
> > > > 
> > > > Then we could easily check each part for "hasRedirected"
> > > > inside the sitemap. And everything should work as expected.
> > > 
> > > Is this really the way one would expect it? The aggregated parts
> > > are (often, but not always) available "standalone". If they then
> > > do a redirect, you get the redirected response.
> > > Now you use aggregation with three parts, one of them is the one
> > > described above. As a result you don't get two other parts and
> > > the first one, but only the first one. And I think, you
> > > wouldn't expect it.
> > 
> > I have to admit this heavily depends on the use of aggregation.
> > I would have expected it because we use it only for local
> > aggregation so the subsequent requests of the aggregator are
> > not so obvious.
> > 
> > Your are right this should be configureable per map:part element.
> > 
> Hm, nice to hear "you are right", but did I say that? I feel making
> this configurable is FS.

Well, alright, this was more a... 
both have a point so let's make it configurable ;)

Sorry, I laid the words in your mouth :)
(OT: native speakers - is this the correct phrase?)

> > Anyway an idea how pass the Redirector?
> A new redirector is created for the wrapped environment (AFAIR),
> as the wrapped environment wraps the original one, this shouldn't
> be a real problem.

Thanks, I will have a look into that..

> > All we have is the Source object... and AFAIU this will lead
> > into a completely new request-response cycle, right?!
> Right, but a wrapped environment.

Thanks
--
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: aggregation and redirects

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Torsten Curdt wrote:
> 
> > > I encountered the following:
> > >                                    request -> [part]
> > >                                   /
> > > -request-> [ ContentAggregation ] -request -> [part]
> > >                                   \
> > >                                    request -> [part]
> > >                                              does a redirect
> > >                                              via Redirector
> > >                                              inside an action
> > > 
> > > Unfortunately only the aggregated _part_ is redirected.
> > > I would expect a redirect to happen always at root level
> > > of all aggregations.
> > > 
> > > I've looked into the sitemap.xsl and into the ContentAggregator.
> > > But I have found no way of getting to the (Sitemap)Redirector of the
> > > parts. Maybe we could pass the Redirector to the aggregated parts?
> > > Any idea?
> > > 
> > > Then we could easily check each part for "hasRedirected"
> > > inside the sitemap. And everything should work as expected.
> > 
> > Is this really the way one would expect it? The aggregated parts
> > are (often, but not always) available "standalone". If they then
> > do a redirect, you get the redirected response.
> > Now you use aggregation with three parts, one of them is the one
> > described above. As a result you don't get two other parts and
> > the first one, but only the first one. And I think, you
> > wouldn't expect it.
> 
> I have to admit this heavily depends on the use of aggregation.
> I would have expected it because we use it only for local
> aggregation so the subsequent requests of the aggregator are
> not so obvious.
> 
> Your are right this should be configureable per map:part element.
> 
Hm, nice to hear "you are right", but did I say that? I feel making
this configurable is FS.

> Anyway an idea how pass the Redirector?
A new redirector is created for the wrapped environment (AFAIR),
as the wrapped environment wraps the original one, this shouldn't
be a real problem.

> 
> All we have is the Source object... and AFAIU this will lead
> into a completely new request-response cycle, right?!
Right, but a wrapped environment.

Carsten
> --
> Torsten
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: aggregation and redirects

Posted by Torsten Curdt <tc...@dff.st>.
> > I encountered the following:
> >                                    request -> [part]
> >                                   /
> > -request-> [ ContentAggregation ] -request -> [part]
> >                                   \
> >                                    request -> [part]
> >                                              does a redirect
> >                                              via Redirector
> >                                              inside an action
> > 
> > Unfortunately only the aggregated _part_ is redirected.
> > I would expect a redirect to happen always at root level
> > of all aggregations.
> > 
> > I've looked into the sitemap.xsl and into the ContentAggregator.
> > But I have found no way of getting to the (Sitemap)Redirector of the
> > parts. Maybe we could pass the Redirector to the aggregated parts?
> > Any idea?
> > 
> > Then we could easily check each part for "hasRedirected"
> > inside the sitemap. And everything should work as expected.
> 
> Is this really the way one would expect it? The aggregated parts
> are (often, but not always) available "standalone". If they then
> do a redirect, you get the redirected response.
> Now you use aggregation with three parts, one of them is the one
> described above. As a result you don't get two other parts and
> the first one, but only the first one. And I think, you
> wouldn't expect it.

I have to admit this heavily depends on the use of aggregation.
I would have expected it because we use it only for local
aggregation so the subsequent requests of the aggregator are
not so obvious.

Your are right this should be configureable per map:part element.

Anyway an idea how pass the Redirector?

All we have is the Source object... and AFAIU this will lead
into a completely new request-response cycle, right?!
--
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: aggregation and redirects

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Torsten Curdt wrote:
> 
> I encountered the following:
>                                    request -> [part]
>                                   /
> -request-> [ ContentAggregation ] -request -> [part]
>                                   \
>                                    request -> [part]
>                                              does a redirect
>                                              via Redirector
>                                              inside an action
> 
> Unfortunately only the aggregated _part_ is redirected.
> I would expect a redirect to happen always at root level
> of all aggregations.
> 
> I've looked into the sitemap.xsl and into the ContentAggregator.
> But I have found no way of getting to the (Sitemap)Redirector of the
> parts. Maybe we could pass the Redirector to the aggregated parts?
> Any idea?
> 
> Then we could easily check each part for "hasRedirected"
> inside the sitemap. And everything should work as expected.

Is this really the way one would expect it? The aggregated parts
are (often, but not always) available "standalone". If they then
do a redirect, you get the redirected response.
Now you use aggregation with three parts, one of them is the one
described above. As a result you don't get two other parts and
the first one, but only the first one. And I think, you
wouldn't expect it.

Carsten

> --
> Torsten
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org