> From: Nicola Ken Barozzi [mailto:[EMAIL PROTECTED]] > From: "Konstantin Piroumian" <[EMAIL PROTECTED]> > > > From: Nicola Ken Barozzi [mailto:[EMAIL PROTECTED]] > > > From: "Konstantin Piroumian" <[EMAIL PROTECTED]> > > > > > > > > > > > > > I'd like to propose to add a <map:forward path="" /> node > > > to sitemap. > > > > Behavior should be the same as <map:redirect-to > > > uri="cocoon:/..." />. > > > > > > What's different from current map:call ? > > > > > > <map:call resource="dynamic-page"> > > > <map:parameter name="target" value="{../target}1"/> > > > </map:call> > > > > Isn't map:call used only with resources? With <map:redirect-to > > uri="cocoon:/..." /> you forward your request to any > another pipeline and > > not to resource. So, <map:forward /> should replace the > <map:redirect /> > > syntax with a more appropriate one. > > Ok, then can someone please explain me what resources are for?
Is it possible to use actions inside of a resource? If no then with <map:forward /> you'll have that possibilty. If yes, then I don't know any other difference between a resource and an 'internal-only' pipeline. > > I don't like redirects at all, because they tend to spread > logic in parts of > the sitemap; these pipelines are part of a algorithm only in > the developers > mind. > No explicit contract, and it's difficult to maintain. > > redirects==GOTO > GOTO==bad > --> redirect==bad Agree for real redirects. They should be avoided when possible. But... > > The flowmap will eliminate needs for redirects, like whiles and ifs > eliminated the need for gotos. ... I don't think that flowmap will remove internal redirects completely - it will simply replace them by selectors. A simple scenario can look like this: <map:match pattern="flow-input"> <map:act type="ProcessFlowEvent"> <map:select type="flow-state"> <map:when test="in-process"> <map:call resource="show-page"> <map:parameter name="current-page" value="{page}" /> </map:call> </map:when> <map:when test="finished"> <map:call resource="show-success-page" /> </map:when> ... </map:act> <!-- Perform this if 'null' was returned --> <map:call resource="default-page" /> </map:match> (Hm... not very simple, though) <map:forward-to /> or <map:redirect-to uri="cocoon:/" /> are simply ways to use pipelines as resources and nothing else (no real redirects!). So, you could use matchers for displaying some of the pages in the above example. > > I'm -1 for this, unless you can show me that the flow system > is not able to > supplant the need for redirects. You cannot be -1 for this, because it is already implemented in the treeprocessor sitemap ;). I'm just proposing a more obvious name for <map:redirect-to uri="cocoon:/" /> as it is confusing and the reason of raising this here were messages in Cocoon Users List. Konstantin > > -- > Nicola Ken Barozzi [EMAIL PROTECTED] > - verba volant, scripta manent - > (discussions get forgotten, just code remains) > --------------------------------------------------------------------- > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]