You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Piroumian, Konstantin" <KP...@flagship.ru> on 2001/10/01 11:21:27 UTC

[C2] Environment.getAction() method

Hi, C2ers!

Can anybody explain me why the getAction() method is in Environment
interface? Why the action param name (cocoon-action) is hard-coded and
cannot be configured? I'd like to have a possibility to select (filter)
actions to be performed by a more flexible way. I'd propose to make the
action selection mechanism configurable in sitemap. E.g.:

<map:action-sets>
  <map:action-set name="authentication" selector="url-selector">
    <map:act type="session-invalidator" action="logoff"/>
    <map:act type="session-validator"/>
    <map:act type="session-create" action="authenticate"/>
  </map:action-set>
  <map:action-set name="shop-actions" selector="url-param-selector">
    <map:act type="cart-add" action="addItem"/>
    <map:act type="cart-remove" action="removeItem"/>
    <map:act type="cart-remove-all" action="removeAll"/>
    <map:act type="cart-update" action="updateQty"/>
  </map:action-set>
</map:action-sets>

So, there could be different ways of determining if the action matches the
current request. Example:
1. URL: http://host/login - uses the URL itself to determine the action and
matches the <map:act type="session-create" action="authenticate"/>
2. URL: http://host/cart?action=addItem - uses URL param to select an action
and matches <map:act type="cart-add" action="addItem"/>

More complicated behavior is also possible (matching actions by wildcards,
regular expressions, etc.).

Are there any comments, future plans or something related to actions? Design
patterns of developing complicated sitemaps with a lot of actions or so
would be fine.

Best regards,

Konstantin Piroumian
Sr. Software engineer

Protek Flagship LLC
Phone: + 7 095 795 0520 (add. 1288)
Fax: + 7 095 795 0525
E-mail: kpiroumian@flagship.ru
http://www.protek.com











---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: [C2] Environment.getAction() method

Posted by Torsten Curdt <tc...@dff.st>.
> * maybe of topic *
> We are currently implementing an xforms implementation using an home-made
> action and a ditto transformer
> for doing extremely complex, yet configurable application development.
> This is an effort to reduce application development time from 12 weeks to 2
> weeks for web applications
> within a governmental organisation, which according to swedish law, has to
> publish the data gathered.
> Basically were createing the micro applications within cocoon.
> There is currently a lot of activity in the cocoon-dev list on this topic
> (contexts) and i think these to topics are related as
> both techniques are used in our project (or any project using cocoon to do
> more that viewing data).
>
> Regards
> Per-Olof Norén
> Stockholm, Sweden

Have you had a look http://sourceforge.net/projects/exformula/
It would be great to share some thoughts or maybe join forces.
--
Torsten


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [C2] Environment.getAction() method

Posted by Per-Olof Norén <pe...@alma.nu>.
Hi all,

----- Original Message -----
From: "Piroumian, Konstantin" <KP...@flagship.ru>
To: <co...@xml.apache.org>
Sent: Monday, October 01, 2001 11:21 AM
Subject: [C2] Environment.getAction() method


> Can anybody explain me why the getAction() method is in Environment
> interface? Why the action param name (cocoon-action) is hard-coded and
> cannot be configured? I'd like to have a possibility to select (filter)
> actions to be performed by a more flexible way. I'd propose to make the
> action selection mechanism configurable in sitemap. E.g.:

Yes, there is definetly a need for a closer look at what the user patterns
for actions
are and perhaps to extend as you suggest. My guess is that a lot of people
like a clean approach of using a pipeline with static file generated source
followed by a html serializer, and NOT xsp to handle what really should be
an action.
I can think of a number of different actions that could easily be done from
xsp.
I know there has been discussions about actions/pipeline logic. Not sure
what
the outcome was though.

.....

> More complicated behavior is also possible (matching actions by wildcards,
> regular expressions, etc.).

Is it possible to reuse some of the selector code from the sitemap to
implement this?

....

> Are there any comments, future plans or something related to actions?
Design
> patterns of developing complicated sitemaps with a lot of actions or so
> would be fine.

* maybe of topic *
We are currently implementing an xforms implementation using an home-made
action and a ditto transformer
for doing extremely complex, yet configurable application development.
This is an effort to reduce application development time from 12 weeks to 2
weeks for web applications
within a governmental organisation, which according to swedish law, has to
publish the data gathered.
Basically were createing the micro applications within cocoon.
There is currently a lot of activity in the cocoon-dev list on this topic
(contexts) and i think these to topics are related as
both techniques are used in our project (or any project using cocoon to do
more that viewing data).

Regards
Per-Olof Norén
Stockholm, Sweden



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org