O'Reilly logo

Professional Cairngorm™ by Jeremy Wischusen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

5.1. What Is It?

The FrontController is one of the core singleton classes of the Cairngorm framework. According to the article "Flex 3: Introducing Cairngorm" (Adobe Customer Training/Partner Enablement Group, Burleson, Shuman, and Boles), 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 FrontController essentially acts as a central processing unit for responding to events that need some sort of processing to occur (or as the authors of the article refer to them, business events). This may mean that a remote service needs to be accessed to update or retrieve data or that the ModelLocator class simply needs to be updated based upon a user action. The singleton design allows these events to be handled in a centralized location rather than being scattered across the application.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required