Macrobot: Macro Commands For Robotlegs
06.29.2011Robotlegs is a fantastic micro-architecture for ActionScript. One pattern used with Robotlegs is the command pattern. Commands are generally short-lived objects that execute a segment of code in response to an event. By encapsulating code in a command, you can maintain low coupling in your app (the view and the command don’t need to be aware of each other) and reduce duplicate code. See the Robotlegs Best Practices page for more info regarding commands.
You may run into situations where you wish to batch commands. Macrobot simplifies this process and provides two ways to batch commands:
Sequence: The batch of commands will be executed in order. The second command will not be executed until the first is complete, the third command will not be executed until the second is complete, and so on. The batch will not be complete until all its commands are complete.
Parallel: The batch of commands will be executed as quickly as possible without respect to completion of any of the other commands. The commands may complete out-of-order. The batch as a whole will not be complete until all its commands are complete. Continue reading »

