Cairngorm (Flex framework)
Encyclopedia
Cairngorm was one of the primary open source
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...

 frameworks for application architecture in Adobe Flex
Adobe Flex
Adobe Flex is a software development kit released by Adobe Systems for the development and deployment of cross-platform rich Internet applications based on the Adobe Flash platform...

. It was developed by iteration::two, who was acquired by Macromedia
Macromedia
Macromedia was an American graphics and web development software company headquartered in San Francisco, California that produced such products as Flash and Dreamweaver. Its rival, Adobe Systems, acquired Macromedia on December 3, 2005 and controls the line of Macromedia...

 in 2005. It is part of the Adobe Engagement Platform
Adobe Engagement Platform
At Adobe MAX 2008, Adobe announced the new Flash Platform concept, and this has replaced the branding formerly known as Adobe Engagement Platform.In 2005, Adobe Systems bought Macromedia. The Adobe Engagement Platform was the announced name of the product line resulting from the merger of...

.

Adobe Labs features Cairngorm as the architectural framework for Rich Internet Application
Rich Internet application
A Rich Internet Application is a Web application that has many of the characteristics of desktop application software, typically delivered either by way of a site-specific browser, via a browser plug-in, independent sandboxes, extensive use of JavaScript, or virtual machines...

 programmers.

Model View Controller based architecture

Cairngorm is based on the MVC model
Model-view-controller
Model–view–controller is a software architecture, currently considered an architectural pattern used in software engineering. The pattern isolates "domain logic" from the user interface , permitting independent development, testing and maintenance of each .Model View Controller...

. 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
Front Controller pattern
The Front Controller Pattern is a software design pattern listed in several pattern catalogs. The pattern relates to the design of web applications. It "provides a centralized entry point for handling requests."...

. 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/schemas.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK