In this chapter you looked at the Cairngorm FrontController class. The FrontController has the following characteristics:
It intercepts dispatched business events and forwards each event instance to the appropriate command instance for processing.
It serves as a registry of event-to-command mappings of Cairngorm event and command classes.
The location of the FrontController class in a Cairngorm application may vary, but is typically found in either the business package (as in the FStop application ) or the control package (as in the Cairngorm store example).
You create a specific FrontController class (e.g., CairngormExampleController) by extending the com.adobe.cairngorm.control.FrontController class.
An instance of the FrontController class must be included in the application so that Cairngorm events can dispatch to it.
You add event-command pairings to the FrontController by calling the addCommand function and passing it the event type and command class.
You do not need to directly reference the instance of the FrontController class, as the details of doing so are taken care of for you when you call the dispatch method of a Cairngorm event class.