cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <giac...@apache.org>
Subject Re: [C2]Action proposal (long)
Date Fri, 24 Nov 2000 23:09:23 GMT
Hi all

Sorry, for my absence. I had really much to do beside of Cocoon 2.

I'll resume the outstanding things we still have to do:

We had several proposals. The first was:

        <action-chain name="database-manipulation>
         <act type="insert-action" action="insert"/>
         <act type="delete-action" action="delete"/>
         ...
        </action-chain>

We had a +1 from Timm Sean. Brian Olsen and Peter Donald mentioned that
it would double semantics. This is correct but will reduce verbosity
tremendously. The alternative Brian gave a +1 was:

        <select type="action-selector">
         <when test="insert">
          <act type="insert-action"/>
         </when>
         <when test="delete">
          <act type="delete-action"/>
         </when>
       ...
         <otherwise>
          <act type="unknown-action"/>
         </otherwise>
        </select>

In my oppinion this would eliminate the need for an action-chain but
wouldn't allow for collecting elegantly returned values from the actions
in a chain to use in resource specifications in a src attribute for a
generator like 

	<map:act chain="mychain">
	  <map:generate src="dir/{action-value}"/>
	</map:act>

There has also been a suggestion for handling exception thrown by
actions as like: 

	<act type="secure-data-entry">
	  <act type="parse-input-and-make-information-available">
	    ...
	  </act>
	  <handle exception="invalid-user">
	    <generate src="..."/>
	  </handle>
	  <handle exception="no-database-connection">
	    <generate src="..."/>
	  </handle>
	  ...
	</act>

In my oppinion this is a selector approach on exceptions, so why not

	<act type="secure-data-entry">
	  <act type="parse-input-and-make-information-available">
	    ...
	  </act>
	  <select type="action-result">
	    <when test="invalid-user">
	      <generate src="..."/>
	    </when>
	    <when test="no-database-connection">
	      <generate src="..."/>
	    </when>
          </select>
	  ...
	</act>

and the actions communicate directly with the "action-result" selector
by setting values in the context.

My suggestion to this would be let's finally discuss and vote what we
should implement and use that as a proof of concept for Actions. Also if
anybody has a better name for it (Action/acting/act) come up with it.

Giacomo

Mime
View raw message