OK Thanks for your help.

Steve

On 12/6/06, hank williams <[EMAIL PROTECTED]> wrote:

  Steve,

I dont know much about cold fusion, but as a general architectural
strategy I think you are mistaken in thinking that combining CFCs to group
together lookups.

Programming is all about creating simple functions, then creating more
complex functions that use the simpler functions and then more complex
functions that use those, etc. I dont know what the information you are
trying to display is, but I would generally recommend (without knowing the
actual specifics here) that you should, as I initially suggested, do this
grouping on the server side. This is the kind of work that servers are
suposed to do. There is no reason the simpler functions cant also be
accessible to the client or to other objects on the server, but if you have
a complicated function that builds on a variety of queries that is almost
always done on the server side.

Of course as I said, I dont know anything about cold fusion, so the
mechanics of exactly how you do what I am talking about in CF is beyond me.
But If you are doing a ton of massaging of data in the client, it is a sign
that you server side code is not delivering high level enough information.

Regards,
Hank


On 12/6/06, Steve House <[EMAIL PROTECTED]> wrote:
>
>  Hank,
>
> Thanks for your reply.  I am not sure I am explaining this correctly but
> let me try adding these details and see if this helps.  My backend is
> ColdFusion and I have created Flex remote objects to several CFCs that each
> correspond to a separate business object (not necessarily one table).  For
> example, I have an employeeGateway.cfc who's methods all pertain to
> employees (e.g. readEmployeeById(), readEmployeeByUsername(),
> addEmployeePermission()).  From what I understand I have to set up a remote
> object connection to each CFC that I want to talk to.  Although I could
> create a single CFC to group together lookup table queries I prefer to keep
> them in their distinct CFCs to allow for future methods related to those
> objects.
>
> Does this clear things up at all or am I still way off?  Thanks again
> for your help!
>
> Steve
>
> On 12/5/06, hank williams < [EMAIL PROTECTED]> wrote:
>
> >   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] <cyberdust%40gmail.com>>
> > 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 <flexcoders%40yahoogroups.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