Steve,

You definitely shoud not have a business delegate for every lookup
table. I dont really understand the detail of what you explained in
your email, but communications between a client and a server should
never be as granular as mapping just directly to a table. Think of
communications with a server as asking high level questions like, "who
are my top spending customers this month". This might require access
to several tables. This calculation work should be done on the server
and the results should then be delivered from the server to the
client. The client should generally not be taking the results of
several table searches and intersecting, joining, merging or anything
of the sort. That is really server side work.

Regards,
Hank

On 12/5/06, stevehousefl <[EMAIL PROTECTED]> wrote:
> Douglas (and all),
>
> Since they are not dependent on each other, I went with just having a
> single command fire 6 new events.  I will look into the MacroCommand
> though.
>
> As far as the 6 different datasources, it is not.  Perhaps this is
> incorrect, but I have a business delegate for each lookup table and a
> service (remote object) for each Coldfusion component that I am
> talking to.
>
> For example:
>
> My EVENT_LOAD_CONTROL_PANEL executes the LoadControlPanelDataCommand
> The LoadControlPanelDataCommand fires the EVENT_READ_ALL_QUEUES (and 5
> other events)
> The EVENT_READ_ALL_QUEUES executes the ReadAllQueuesCommand
> The ReadAllQueuesCommand creates a QueueDelegate and executes
> QueueDelegate.readAllQueues()
> The QueueDelegate creates an instance of the ServiceLocator and
> executes .getRemoteObject("queueService")
> The queueService is configures in Services.mxml as
>
> <mx:RemoteObject
> id="queueService"
> destination="ColdFusion"
> source="CF.queueHandler"
> showBusyCursor="true"
> result="event.token.resultHandler( event );"
> fault="event.token.faultHandler( event );"/>
>
> Does this make sense????
>
> Thanks,
>
> Steve
>
>
> --- In flexcoders@yahoogroups.com, Douglas McCarroll
> <[EMAIL PROTECTED]> wrote:
> >
> > Hi Steve,
> >
> > I'm going to take a stab at this as I've been studying the Command
> > pattern (as defined in GoF) and Cairngorm lately. In fact I'll be
> > presenting on the subject here in Boston tomorrow evening, so this is
> > right up my alley. (www.bfpug.us)  :-)
> >
> >  > how do you handle 6 different results since there is only 1
> >  > onResult function.
> >
> > I think that the answer here is "you don't".  :-)
> >
> > Cairngorm has a SequenceCommand which has:
> >
> > public var nextEvent : CairngormEvent;
> >
> > You can then call its executeNextCommand() from your result() method
> > which launches that event.
> >
> > This will work well enough if you need results from command_1 before
> you
> > make the service call in command_2, which you need before command_3,
> etc.
> >
> > On the other hand, if that's not the case, what to do?
> >
> > The Gang Of Four chapter on the Command pattern describes a
> MacroCommand
> > that executes a number of (Simple)Commands. As described it seems to
> > simply fire them off, one after another. Wouldn't be hard to roll your
> > own, extending ICommand, with an array property, and passing in Command
> > objects.
> >
> > I could even see creating an MacroEvent class that kept track of
> whether
> > its Commands had finished and that then did something when all were
> > finished.
> >
> > Other Cairngorm programmers, wiser than I, will probably ask you wise
> > questions about why you wish to pull data from six different data
> > sources...  :-)
> >
> >
> > Douglas
> >
> >
> > -------------------------------------------------
> >
> > Douglas McCarroll
> >
> > CairngormDocs.org Webmaster
> > http://www.CairngormDocs.org
> >
> > Flex Developer
> > http://www.brightworks.com
> > 617.459.3840
> >
> > -------------------------------------------------
> >
> >
> >
> >
> >
> >
> > stevehousefl wrote:
> > >
> > > I have a command that I would like to have pull lookup data from 6
> > > different BusinessDelegates. Should that one command call all 6
> > > delegates or should it fire 6 new events that call 6 new commands?
> > >
> > > If the one command should call all 6 delegates in its execute
> > > function, how do you handle 6 different results since there is only 1
> > > onResult function.
> > >
> > > I am using Cairngorm 2.1.
> > >
> > > Thanks in advance,
> > >
> > > Steve
> > >
> > >
> >
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
>
>
>

Reply via email to