cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: Action proposal
Date Sat, 16 Sep 2000 15:35:12 GMT
At 02:48  16/9/00 +0200, you wrote:
>Peter Donald wrote:
>> I finally got around to looking at action framework to see if it fitted all
>> my needs. I tested it against the following applications I have developed
>> in past.
>> Guess what C2 + proposed actions == 100% success :P

like that bit did you ? :P

>> Now when a user tries to access a resource what happens ?
>> First cocoon will build up a list or chain of implicit actions. (Implicit
>> meaning those that are defined via the sitemap). Then it will parse
>> cookies/post/get input to grab the explicit user submitted actions and
>Cocoon is not (or better will not) parse any cookies/post/get things.
>This is delegated to the sitemap components because it is environment

so how would you see a form working ?

>> build an action chain out of them. However we don't want the user to be
>> able to submit arbitary actions - we want control over this for security
>> reasons - so this leads us to the next step: Action chains in sitemap
>> <map:action-chains default="none">
>No default. I think it goes at the level like <map:resources> and

yup :}

>To be consistent with the rest of the sitemap syntax I suggest using:
>  <map:action-chains>
>    <map:action-chain name="data-entry">
>      The type= attribute references a action defined in the 
>      components actions section
>      <map:perform type="validate-form" />
>      <map:perform type="save-form" />
>    </map:action-chain>

sounds good.

>> The one last requirement is that remainin explicit actions in chain can be
>> saved and deferred by some means programmatically.
>I suggest leave this for later and concentrate on actions and

yep but it is important - almost every login action will do some rerouting :P

>> So in conclusion this is what C2 needs:
>> * building implict action chain (as per Giacomo's proposal)
>> * building explicitly requested action chain (as per above or another
>> * some way to push explicitly submitted actions onto stack and then pop and
>> execute them later
>Ok, let me summarize to see if I grasped it:
>Explicit actions are those presented to the user in kinda control panels
>or alike (do that, check this, etc.). From the sitemap point of view
>they can be collected into action-chains. In the pipeline section of the
>sitemap explicit Actions and especially action-chains do not have a way
>to control sitemap evaluation flow by means of the List object an Action
>may return and thus cannot have nested elements from the sitemap
>namespace (Parameters should be allowed). Of course they can communicate
>with other sitemap component ddduring pipeline evaluation time through
>the objectModel Map. 

hmm - right - I think. It may be useful for a explicit action to redirect
to an error page or form page if the user badly formats an action - is this
possible ?

>Implicit actions are those which do processings like data validation and
>signal the sitemap engine if nested elements are to be evaluated or not
>by means of returning a List object or null. The List object is used to
>substitute occurences of {n} in src attributes of nested sitemap
>components (Generators, Transformers, Readers). The n in {n} is a number
>representing the index into the last List returned by a component to the
>sitemap engine. An expression like {../2} means the 2. element of the
>List returned by the parent component of the last components returning a
>List (and so on).

I think so (not so familiar with C2 :P)

>The sitemap engine is only able to distinguish action-chains from
>actions but not explicit actions from implicit action. The sitemap
>engine will call ations in an action-chain in the order they are
>defined. It's the responsability of the action itself to determine what
>processing it should be doing. 


>Any comments?

Not really except how do use see explicit actions being triggered ? Do you
have an action apply to sitemap that explicitly parses out data from
cookies/put/get/post request ?



| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |

View raw message