FlexManiacs - Jim Robson - Managing Complexity with Cairngorm
Jim has been working with Flash since 1999 when Flash 4 was new.
As applications develop, requirements grow and complexity increases so it is important to be able to add new facilities. Cairngorm makes it easy to collaborate on a single file or projects. It makes it easy to find things in your code and add new features.
Every time you use Cairngorm you have to add the Cairngorm Library to the build Path in project properties. Ant can be used to create the application skeleton to save a lot of typing. Eric Feminella has written some Ant Scripts, which create several objects needed by the framework. Several folders are created with Actionscript files in each already.
- business
- commands
- control
- events
- model
- vo
In the class we created a news reader which would take newsfeeds from Reuters. There were one or two problems keeping up with the class. (I am not used to the US keyboard.)
www.cairngormdocs.org is the place to go for the full description of the framework.
My overall impression was that there does seem to be more overheads here than is really necessary for a simple application and I am concerned that with a really large application the huge number of files will grow and make it difficult to maintain things.
At lunch I talked with Mike and Angie Nimer who have some experience of using Cairngorm. They confirmed my thoughts and both said that there is a heavy price to pay in terms of extra overhead required in order to build an application with Cairngorm.


Using Cairngorm to build something as simple as reading a newsfeed does seem like overkill and if I were teaching a basic course, I'd not include the framework in the material as it introduces questions not about the main content. Have you read Steven Webster's posts on when to consider not using Cairngorm?
http://weblogs.macromedia.com/swebster/archives/20...
Thanks,
Alistair
For Sample applications Cairngorm is overkill, however a sample is really there to explain how Cairngorm is used.
I have found Cairngorm extremely useful for any flex application from moderate to increasing complexity. Where it excels at is making the developer think in best practise design patterns...
So where I might normally, put an array collection in a Component, say to store an array of tags for my RSS reader, if its in the model, later I can reuse the same array collection later on in a different view type component.
Also I found it very useful for maintenance of flex applications when the majority of code is done in the commands.
Overall it does provide an overhead, but one that helps the developer in the long run. And Ant based Cairngen from Eric is a HUGE time saver...
(steps off soapbox)
I am not saying I wouldn't use it but for a flex newbie it a big learning curve and since the project I am planning is non trivial perhaps Cairngorm is the best choice but I was hoping to have a choice of frameworks.
http://www.ariaware.com/products/arp/ (this one has been around for a while its flash and flex framework)
There was another, based on the Gang of 4 Design Patterns but I cannot find the link at the moment... its called PureMVC...
http://puremvc.org/
http://www.guasax.com/