Sunday, January 24, 2010

Start Flex/AIR with Cairngorm


Overview:
Cairngorm Microarchitecture is open source framework for developing RIA development in Flex and AIR. It is based into MVC model.  Whole module is divided into following part

Model: -It is centralize storage of the data which used in entire application. Model Locator  is singleton class. It means only have single instance of this Model class.

Controller:- It is extended base class Frontcontroller. The FrontController maps a CairngormEvent to a Command. The class extends FrontController and has two methods: the constructor and the initialize method. The initialize method is where you will use the addCommand method to map your events to commands.

Command: - Command class implements the interface ICommand. Command class used for wirting the business and functional logic of your application. For a Command to function properly in Cairngorm, it needs to implement the ICommand interface. This interface requires that a command have a method named execute and that it accept the CairngormEvent that is mapped to it as an argument.

Events:- Your event class extends the CairngormEvent. It is central in this pattern. It extends from Event. For your event to be handled properly in Cairngorm, it will need to be of type CairngormEvent.

Business Delegate:- The final design pattern in the Cairngorm Micro-Architecture is the Business Delegate. A Business Delegate essentially is the abstraction layer between your services and the rest of your application.

Vo:-  Vo stands for the Value Object.

View:- It is user presentation screen.

My one of the best guide for the Cairngorm is:

I thanks to David Tucker for it.