The previous sections describe the flow of control through the various design patterns in a Cairngorm architecture. Each and every feature in an application traces the same flow of execution, with user gestures becoming events, events becoming service calls, and data passing back into the model.
When you add a new feature to a Cairngorm application, it is as simple as the following process:
addCommand(). execute() method to
do the work. Implement the result() method to
handle any results from the server:
Additionally, you will have to create any Value Objects that are required to pass data between the command and Business Delegate, between the Business Delegate and the server, or to store data on the Model Locator. Typically, however, your Value Objects will exist early in the development of your application and you will normally reuse them as you add new features to your application.
Similarly, as your application grows, the server-side services quickly become locked in place and application development proceeds even more quickly, following a simplified process:
addCommand(). That's really all there is to it.
Debugging a Cairngorm application involves the same predictable steps. If a desired feature doesn't perform in response to a user gesture, the debug cycle is always the same:
execute() method is
called on the command by the Controller. result() method is
called in the command. With these five steps, it's painless to isolate a problem in an application and fix it.