In this post I will cover brief about the flex Cairngorm framework , integration with SpringActionscript framework, SpringActionscript Cairngorm extension and other available cairngorm extensions and which may fit where in terms of specific tasks.

On a whole, agenda is:

Cairngorm framework – Flex MVC framework, available resources and how to get started.

SpringActionscript framework – IOC framework, how to get started and how it helps.

SpringActionscript Cairngorm extension – How it helps in following best practices and how to use it.

Cairngorm UM extension – UM extension for specific operations.

Cairngorm

The first impression of the cairngorm you will have is the lightweight micro-architecture. What it means that it will give you the direction to follow the best practices of flex in easy and quick way and as you move adopt as per the requirements.

SpringActionscript

There are few IOC framework available but being a java developer, I am fan of Spring and here it is an extension of that SpringActionscript 🙂, earlier known as Prana Framework. Like spring, you can use this framework for object injection. Have a look at the home page to get started.

Maven Integration: Use the following dependencies and repository entries to get started.

Sometimes the best way to learn about the best practices is to go through the open source code available. The available IOC frameworks for Flex, have a look at the sample code examples and the source code here gives good idea to structure your code.

SpringActionscript Cairngorm Extension

Have a look the tutorial explaining that how you can integrate springactionscript with cairngorm.

If we talk about the dependencies and different mappings in Cairngorm, what we need is:

Event name and command mapping in front controller:define it in context file

Command needs models: inject it through context configuration file

Command needs delegate: define and inject through context file

Delete needs service: define it in context file, helps in testing to define the mock objects

Services and Amf channel configurations: configure it in context file

I am planning to cover all this with a sample example in the coming posts (will be too much to put everything here).

Cairngorm UM (UniversalMind) Extension

Have a look at Home page for list of add-ons provided by flexcairngorm.

Specially the one I like is the view notification implementation. You can either use the same extension or have a look at the implementation that how it is done and make changes in the base command and event classes to have the similar approach.

I will be posting soon the different approaches for the view notification and what all changes you need to do.

Cairngorm 3

Have a look at ideas suggested by Marcin at the page and see how it fits in your case. Haven’t explored what this guy has suggested but feel free to explore more yourself.

Stay tuned for the sample code examples on how to use these frameworks to solve specific problems. I am planning to cover sample code for SpringActionscript cairngorm extension integration and custom implementation of UM extension for view notifications.