- Cairngorm (Flex framework)
Cairngorm is one of the primary
open source frameworks for application architecture inAdobe Flex . It was developed by , who was acquired byMacromedia in 2006. It is part of theAdobe Engagement Platform .[http://labs.adobe.com/wiki/index.php/Cairngorm Adobe Labs features Cairngorm] as the architectural framework for
Rich Internet Application programmers.Model View Controller based architecture
Cairngorm is based on the MVC model. It is specifically designed to facilitate complex state and data synchronization between the client and the server, while keeping the programming of the View layer detached from the data implementation.
The role of the View layer in a Cairngorm application is to throw events and bind to data stored in the Model. Components on the View can bind to Value Objects or other properties in the Model (data) layer.
In a Cairngorm Model, related data are stored in Value Objects (VOs), while simple variables can be stored as direct properties of the ModelLocator class. A static reference to the ModelLocator singleton instance is used by the View layers to locate the required data.
The Controller is the most sophisticated part of the Cairngorm architecture. The Controller layer is implemented as a singleton FrontController. The FrontController instance, which receives every View-generated event, dispatches the events to the assigned Command class based on the event's declared type.
The Command class then processes the event by running the Command class' execute() method, which is an ICommand interface method. The event object may include additional data if required by the developer. The execute() method can update the central Model, as well as invoke a Service class which typically involves communication with a remote server. The IResponder interface, which is also implemented by the Command class, includes onResult and onFault methods to handle responses returned from the invoked remote service.
The nature of a Cairngorm application
A Cairngorm application can be programmed to manage any server architecture/schema.
External links
* [http://www.cairngormdocs.org/tools/CairngormDiagramExplorer.swf Cairngorm interactive diagram and code explorer]
* [http://www.asfusion.com/examples/item/hello-world-cairngorm-example Hello World Example using Cairngorm]
* [http://www.adobe.com/go/cairngorm New Cairngorm Home]
* [http://www.davidtucker.net/category/cairngorm/ Video Tutorial Series on Cairngorm]
* [http://www.artima.com/lejava/articles/gammadp.html How to Use Design Patterns, A Conversation with Erich Gamma]
Wikimedia Foundation. 2010.