Guasax actions have to be named uniquely?

1 view
Skip to first unread message

michaelangela

unread,
Jul 30, 2007, 7:29:26 PM7/30/07
to guasaxcoders
I have developed some apps with Cairngorm and I was looking at Guasax
as a possible alternative.

If I understand correctly, Guasax uses guasaxContainer.executeAction
where Cairngorm would dispatch events which are mapped to commands in
the FrontController. So instead of Cairngorm's "dispatch someEvent",
it is guasaxContainer.executeAction(someAction). And in Cairngorm, the
FrontController would catch the event which would trigger the Command.
In that sense, guasaxContainer *is* the FrontController bu this
analogy, where you just call the action directly.

With that, in the guasax-conf.xml configuration file, does each action
ID have to be unique? For example, in the calculator sample, you have
"calculate", and it is on the "calculator" component. If I had a
different component, say "calcSummaries", and I wanted to be able to
calculate summaries, would I have to have a unique ID for it in the
guasax-conf.xml file? For example would this should work:

<guasax version="0.9.2a" description="Framework MVC para Flex 2">
<component id="calculator"
className="es.guasax.samples.calculator.bo.CalculatorBO"
enabled="true">
<action id="calculate" method="calculate" />
</component>
<component id="calculator"
className="es.guasax.samples.calculator.bo.CaculateSummariesBO"
enabled="true">
<action id="calculateSummaries" method="calculate" />
</component>
</guasax>

And I would not be able to use action id="calculate" for both,
correct? It seems they would have to be unique, similar to Cairngorm's
FrontController where each command is a completely separate command.
So even though one BO may have several methods exposed, we would list
them separately and with unique IDs in the guasax-conf.xml file. Is
that correct?

I am trying to see how much work it would be to port a Cairngorm app
over to Guasax and if it would be worth it to do so for ease of future
development. :-)

Thanks!

Michael

ablesa

unread,
Aug 3, 2007, 2:12:51 PM8/3/07
to guasaxcoders
Hi Michael,
I answer your question in your mail,

On Jul 31, 1:29 am, michaelangela <mcwi...@gmail.com> wrote:
> I have developed some apps with Cairngorm and I was looking at Guasax
> as a possible alternative.
>
> If I understand correctly, Guasax uses guasaxContainer.executeAction
> where Cairngorm would dispatch events which are mapped to commands in
> the FrontController. So instead of Cairngorm's "dispatch someEvent",
> it is guasaxContainer.executeAction(someAction). And in Cairngorm, the
> FrontController would catch the event which would trigger the Command.
> In that sense, guasaxContainer *is* the FrontController bu this
> analogy, where you just call the action directly.
>
> With that, in the guasax-conf.xml configuration file, does each action
> ID have to be unique?

Yes, that's true.


For example, in the calculator sample, you have
> "calculate", and it is on the "calculator" component. If I had a
> different component, say "calcSummaries", and I wanted to be able to
> calculate summaries, would I have to have a unique ID for it in the
> guasax-conf.xml file? For example would this should work:
>
> <guasax version="0.9.2a" description="Framework MVC para Flex 2">
> <component id="calculator"
> className="es.guasax.samples.calculator.bo.CalculatorBO"
> enabled="true">
> <action id="calculate" method="calculate" />
> </component>
> <component id="calculator"
> className="es.guasax.samples.calculator.bo.CaculateSummariesBO"
> enabled="true">
> <action id="calculateSummaries" method="calculate" />
> </component>
> </guasax>
>
> And I would not be able to use action id="calculate" for both,
> correct?

> It seems they would have to be unique, similar to Cairngorm's
> FrontController where each command is a completely separate command.
> So even though one BO may have several methods exposed, we would list
> them separately and with unique IDs in the guasax-conf.xml file. Is
> that correct?

Yes, the "id" would have to be unique.

>
> I am trying to see how much work it would be to port a Cairngorm app
> over to Guasax and if it would be worth it to do so for ease of future
> development. :-)

I have prepared a post with the complete Flex Store Sample (http://
cairngormdocs.org/blog/?p=17) port to Guasax.

>
> Thanks!
>

Thank you for your comments :).

> Michael

Reply all
Reply to author
Forward
0 new messages