cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: [control flow] changes and new sample
Date Mon, 09 Sep 2002 08:52:28 GMT
Ovidiu Predescu wrote:

>
> On Sunday, September 8, 2002, at 01:57 PM, Sylvain Wallez wrote:
>
>> Ovidiu Predescu wrote:
>

<snip/>

>>> Actually I now realize that declaring flow scripts this way, 
>>> interferes with Vadim's proposal on using <map:flow> to invoke a 
>>> function or restart a continuation. Can we find a better name for 
>>> <map:flow> in this context? I was thinking of <map:flow-resources>,

>>> but it's a bit too long for my taste. As an alternative how about 
>>> <map:controller>?
>>
>>
>>
>> I like very much this <map:controller> as it's the name used 
>> traditionnaly in the MVC pattern. Cocoon shouldn't invent a new word 
>> (map:flow) to designate a well-known concept. MVC is much hyped and 
>> is a "magic word" for many customers (see how many of them want 
>> Struts because it's MVC).
>
>
> Good point, Sylvain! Sticking with known names is going to help us in 
> user acceptance as well.
>
>> If we choose <map:controller>, then using <map:flow> to call this 
>> controller doesn't sound well. Something like <map:call-controller> 
>> sounds better, but you may find it a bit lengthy...
>>
>> Other thoughts ?
>
>
> How about calling it simply <map:call> instead of <map:flow>? This is 
> how is called today as well, but we need to modify its semantics to 
> support Vadim's proposal, and to get rid of today's <map:continue>.


<map:call> is already used to call resources. One may say that using the 
same term for both resources and controller can be confusing, but I 
personally think it fully makes sense : "call" means "jump somewhere 
else", be it a resource or a controller-directed page.

So, to sum up things, we end up with :

<!-- declare the controller in a sitemap -->
<map:controller language="JavaScript">
  <map:script src="blah.js"/>
</map:controller>

<!-- start a controller function -->
<map:call function="calc"/>

<!-- continue a controller function -->
<map:call continuation="{1}"/>

<!-- call a resource -->
<map:call resource="my-resource"/>

This now sounds good and natural. Do you like it ?

Sylvain

-- 
Sylvain Wallez
  Anyware Technologies                  Apache Cocoon
  http://www.anyware-tech.com           mailto:sylvain@apache.org




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


Mime
View raw message