[Arp] Multiple Service calls - best way to handle

Brian Riley brian_m_riley at yahoo.com
Fri Mar 10 07:22:41 PST 2006


Keith:

I've had to do this many times, and have gone about it several ways. You could: 

   Leverage the SequenceCommand object from the Cairngorm framework -- while the framework was cerated for Flex, you can easily extend the AS objects to do what you need -- the SequenceCommand object enables a single user gesture to chain several commands together; they're linked together such that one fires upon completion of it's predecessor. Cairngorm

   You can create your own utility for commands that loops through an array of commands and executes each upon completion of the previous one -- this allows a bit more granular control than the SequenceCommand -- you can broadcast additional events that allow you to show a data preloader, etc.

   You can also create a new service call on the server that encapsulates all the service calls and returns a result with a list of your items -- not a fan of this, but I have seen it done. This forces unique services just for your RIA.

best of luck,
-riley
Message: 2
Date: Thu, 9 Mar 2006 16:10:25 -0500
From: "Keith Takayesu" 
Subject: [Arp] Multiple Service calls - best way to handle?
To: "General List for Ariaware RIA Platform users and developers"
 
Message-ID:
 <4A14D0A1A982B04B8DFC50EBDB81D0A2047A62CA at BOC-EXMAIL1.bocad.bank-banque-canada.ca>
 
Content-Type: text/plain; charset="us-ascii"

Ok, I (think) that I need to call a number of services (legacy services,
already built) simultaneously from a command. Each of these commands
returns discrete data. For example: BlueItems, GreenItems, RedItems,
BlackItems, WhiteItems.
 
So, I have a GetItemsByColorCommand, and I feed it the items that I
want, for example, Blue/Green/White or Green/Red, etc. I'd like to have
this Command return only when all the necessary Service data has been
returned.
 
I was thinking that, perhaps, all the service calls would return to the
same responder in the command. The command would maintain a list of
service calls, and which ones have returned. When all have returned,
then it "finishes".
 
Anyone have better/smarter ideas on how to handle this? 
 
Blue skies,
Keith


		
---------------------------------
Yahoo! Mail
Bring photos to life! New PhotoMail  makes sharing a breeze. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ariaware.com/pipermail/arp_ariaware.com/attachments/20060310/8c7f247d/attachment.htm


More information about the Arp mailing list