If I think on different implementations for the flow,
the names are not every intuitive, IHMO.
So, can I offer some alternatives?
On Wed, 16 Jul 2003, Reinhard P�tz wrote:
> [A] The "Cocoon Advanced Control Flow" provides a controller that is
> linked into the sitemap (as **child element** of <map:sitemap
> .../>:
>
> <map:flow type="[yourEngine]">
> [configuration]
> </map:flow>
>
> This reflects that the flow is not a *usual* sitemap resource but
> something else.
The point, which irritates me, is that you don't have a identifier
to address the script/whatever.
So my favorite choise will be
<map:flows>
<map:flow name="js" type="javascript">
<script src="flow/PetStoreImpl.js"/>
<script src="flow/petstore.js"/>
</map:flow>
<map:flow name="java" type="atct" class="org.apache.cocoon...."/>
<map:flow name="fsm" type="fsm" src="descriptors/fsm.xml"/>
</map:flows>
So this will be coherent with the other objects.
>
> [B] The controller is called by:
>
> <map:call flow="[yourFlow]">
> <map:parameter name="x" value="y"/>
> </map:call>
Seems fine, an alternative will be
<map:initiate flow="js" call="[Javascript function]">
<map:parameter name="x" value="y"/>
</map:initiate>
<map:initiate type="java" call="[Java method]">
<map:parameter name="x" value="y"/>
</map:call>
<map:initiate type="fsm" call="[Name of state]">
<map:parameter name="x" value="y"/>
</map:initiate>
I like the combination of initiate/continue
> [C] A state of the controller is called by:
>
> <map:call state="">
> <map:parameter name="x" value="y"/>
> </map:call>
We don't call states in this sense. We continue
a continuation ;-)
I guess <map:continue continuation="{1}"/> is bad.
<map:continue src="{1}"/>
or
<map:continue id="{1}"/>
> [D] All flow interpreters[3] are Avalon components and declared
> in the cocoon.xonf:
>
> <flow-engine default="[yourController]" logger="[yourLogger]">
> ...
> </flow-engine>
+1, except the name, see next.
>
> [E] Changes in the current Javascript implementation:
> - rename "Interpreter" to "FlowEngine",
Again, to be coherent my favorite is
<flow-processor> like <xslt-processor> and <xpath-processor>, or
treeprocessor.
> - rename "WebContinuation" to "FlowState", and accordingly
> "WebContinuationManager" to "FlowStateManager".
Yes, the Continuation represents a state, but to make a clear
difference as a new concept, I think 'Continuation' is accurate.
But 'Web..'?!
- rename "WebContinuation" to "Continuation", and accordingly
"WebContinuationManager" to "ContinuationManager".
Thoughts?
Stephan Michels.