On 06.01.2004 18:07, Stephan Coboos wrote:

starting with 2.1.3, a call to sendPage() or sendPageAndWait() is required in your script. i think it sucks but was unable to convince the dev list. in 2.1.2 and earlier you can just omit any sendPage call and the sitemap continues where the flowscript left off.


Oh, no!!! Why? Is this the right way?


Please see http://marc.theaimsgroup.com/?t=106864448500002&r=1&w=2
and
http://marc.theaimsgroup.com/?t=106849566300008&r=1&w=2


Thank you. But I think this was not a good decision. An action can redirect or return to the actual position. Why not a flowscript? If I want to integrate some "short" logic into a pipeline flow, this is not possible:

<map:pattern match="foo">
   <map:generate type="file" src="myFile.xml"/>
   // For example: Manipulate the session here
   <map:call function="changeSession"/>
  <map:serialize type="xml"/>
</map:pattern>

To do so, I have to create an action which is more complicated than a 5-line flowscript. Hmm.... In my opinion, this doesn't support fast development with cocoon. What a pity.

Of course I ahve to say that, but IMO you are wrong. The way you would use actions is also a misuse. Stefano says in his mail [1] that the real reason for enforcing sendPage() is to separate cleanly between controller and presentation. You first have to do the controller logic, the controller selects the pipeline to go and the pipeline builds the response or whatever. This separation (it's pure "separation of concerns") allows much higher reusability. You can reuse both the controller and especially the pipeline and also code it more independently. Especially in your sample (though it might be only a sample) I see no reason for doing the changeSession() before the pipeline execution.


Joerg

[1] http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=106867021229002&w=4


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to