cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: Action proposal
Date Sun, 17 Sep 2000 01:10:50 GMT
Giacomo Pati wrote:

>  <map:pipeline>
>   <map:match pattern="myapp/**">
>    <!-- this action will parse the cookies/post/get data
>         and make the result of that examination available
>         1. as state information in the objectModel Map
>         2. by returning resource specifications in a List
>    -->
>    <map:act chain="parse-input-and-make-information-available-chain">
>     <!-- this selector will choose among the information
>          made available in the objectModel Map by the previous
>          Action(s).
>     -->
>     <map:select type="input-checker-selector">
>      <map:when test="show-index">
>       <!-- this generator is charged with the appropriate index
>            resource specified in the List returned by the Action
>            above.
>       -->
>       <map:generate src="myapp/{1}/index"/>
>      </map:when>
>      <map:when test="kill-task">
>       <!-- this action kills a task that was spawned previously
>            by another action using data make available by the Action
>            above.
>       -->
>       <map:act type="task-killer"/>
>       <map:generate src="myapp/{1}/task-killing-status-page"/>
>      </map:when>
>      <map:otherwise>
>       <map:generate src="myapp/login"/>
>      </map:otherwise>
>     </select>
>    </map:act>
>    <map:transform src="myapp/general.xsl"/>
>    <map:serialize type="html"/>
>   </map:match>
>   <map:handle-error>
>    <map:transform src="myapp/error-transformer.xsl"/>
>    <map:transform src="myapp/general.xsl"/>
>    <map:serialize type="html"/>
>   </map:handle-error>
>  </map:pipeline>

Hmmm, this reminds me of one of the my early sitemap components when I
was designing it on the whiteboard: I called it "sensor", it was
supposed to "sense" the environment/request/whatever and behave on it.
Then the other components would have been influenced by it's action.

Well, to be honest, I threw it away because I couldn't come up with a
better name, but I agree that "actor/action/act" is much better (even if
much more general and, sometimes, misleading).

But there was another reason why I threw it away.... but I can't
remember tonight (it's 3am I should get some sleep) 

Anyway, it looks cool... I just have to spend more cycles on this... ok,
back on the whiteboard....

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message