Now that I have a pretty good understanding of Cairngorm and its structure I want to put out a question about why to build commands and delegates in the way presented in the store example.
The Command/Responder object always talks to a single delegate object. This delegate object uses the Services.mxml file to determine where to go on the server side. Because of the structure of the delegate you have to be very careful if you want to pass it different command objects to be responders so that you don't have inappropriate behavior in the UI. You could always do a one to one relationship between commands and delegates but you end up with an explosion of different objects. Why not simply bind in what the delegate is currently doing into the command object and have a duplicate command POJO on the server? This way you could have special handling for Flex calls on the server that pull items from the HTTPSession, if needed, and then call a delegate that has multiple methods on it. This way you isolate the Flex pieces from your delegates and can always put another framework like Struts on top of your delegates to provide another user interface. Struts Actions are effectively the Command pattern with a different name. Maybe it is a future expansion point that I am not thinking about. Thanks, -Kent "Black holes are where God divided by zero." - Steven Wright
smime.p7s
Description: S/MIME cryptographic signature