cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: [Vote] Controller/Sitemap integration
Date Wed, 16 Jul 2003 23:22:17 GMT
Because of this upcomming naming discussion I guess the vote started to 
early. First all alternatives should be known. But the additions Stephan 
provided make sense (see inline).

Stephan Michels 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.

Which leads the sentence "This reflects that the flow is not a *usual* 
sitemap resource but something else." ad absurdum :)

>>  [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

initiate/continue is ok, but what about keeping syntax of all sitemap 
objects using @type and @src:

<map:initiate type="java" src="[Java method]"/>

Or is it to far away from the sense or even misleading?

>>  [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}"/>

Same like above, so I prefer @src.

>>  [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.

flow-engine vs. flow-processor - I don't know ...

>>      - rename "WebContinuation" to "FlowState", and accordingly
>>        "WebContinuationManager" to "FlowStateManager".

Here I prefer the States for the reasons Marc provided, so +1 here.

> 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".

If not states, but continuations at least remove 'Web' => +1

Conal Tuohy wrote:
> What about <map:continue from="..."/>

Hmm, I don't really like it. We don't need an English sentence :)

Otherwise you could also change to <map:generate from="foo.xml"/>, 
<map:transform with="bar.xsl"/> and <map:serialize as="html"/>. @type 
and @src is a good abstraction IMO.

Joerg


Mime
View raw message