cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Pötz <reinhard_po...@gmx.net>
Subject RE: [Vote] Controller/Sitemap integration
Date Fri, 18 Jul 2003 08:59:52 GMT


> -----Original Message-----
> From: Stephan Michels
> 
> 
> 
> On Fri, 18 Jul 2003, Reinhard Pötz wrote:
> 
> >
> > From: Stephan Michels [mailto:stephan@apache.org]
> >
> > > A: V1
> >
> > Why do you want implementation details in the element: <map:flows>
> >   ...
> >   <map:flow name="java" type="atct" class="org.apache.cocoon...."/>
> >   <map:flow name="fsm" type="fsm" src="descriptors/fsm.xml"/>
> >   ---
> > </map:flows>
> >
> > I don't think that class or src should be attributes of
> <map:flow/>.
> > It should go into the configuration, shouldn't it?
> 
> I you think of Configuration class, you can do both. But you
> are right in the case of validation(which is in the current 
> case terrible difficult), the second option is better.
> 
> I change my A: V1 to A: V2, okay?
> 
> > > B: V2
> > > C: V1 with flow instead of type
> >
> > to use the flow attribute to determine which implementation is used
> > doesn't make really sense to me. Everywhere else the type 
> attribute is
> > used. I would use the flow attribute to give the flow
> processor a hint
> 
> Which implementation you use is defined in <map:flow>
> 
> <map:initiate> -> select flow -> <map:flow>                     \\
>                   -> select implementation -> <flow-processor>
> 
> Ohh moment, what makes the flow component different from
> other sitemap components? Nothing!

>From a technical POV you are completly right but I share Stefano's idea
that we should show our users that the flow component is different from
the sitemap components. So I'm -1 on this.

> 
> <map:components>
>  <map:flow name="petshop" class=
> "org.apache.cocoon.components.flow.javascript.JavaScriptInterpreter">
>   <reload-scripts>true</reload-scripts>
>   <check-time>4000</check-time>
>   <script src="flow/PetStoreImpl.js"/>
>   <script src="flow/petstore.js"/>
>  </map:flow>
> <map:components>

... so I like the new section <map:flows>...</map:flows> more. See the
reasons above.

And I think it is FS to determine the implementation
(org.apache.cocoon.components.flow.javascript.JavaScriptInterpreter) at
sitemap level. 
Do you have a usecase which makes this necessary? I wrote a lot of JS
flow scripts and haven't had a need for this yet.

<map:flows>
>  <map:flow name="petshop" class=
> "org.apache.cocoon.components.flow.javascript.JavaScriptInterpreter">
>   <reload-scripts>true</reload-scripts>
>   <check-time>4000</check-time>
>   <script src="flow/PetStoreImpl.js"/>
>   <script src="flow/petstore.js"/>
>  </map:flow>

</map:flows>

> 
> <map:initiate type="petshop" start="addItem"/>
> <map:continue type="petshop" id="{1}"/>
> 
> Hey, I love this :)

I think this obscures that a flow processor/engine is used. Of course
this makes only sense in connection with <map:flows>...</map:flows>.
Therefore I like following syntax more.

<map:initiate flow="addItem" type="petshop" />
<map:continue flow="{1}"     type="petshop" />

Would you be fine with this?

Cheers,
Reinhard


Mime
View raw message