Cairngorm with Michal Glowacki at NYFlex!
I am a big fan of frameworks in general. Using an established framework helps structure an application. Structured applications are much easier to understand and maintain. Additionally, using a framework can make programming an application easier, quicker or a combination of the two.
In the Flex world there are two main frameworks ARP and Cairngorm. I am very much interested in gaining proficiency in both frameworks and I admit to not having put much time aside for experimentation and learning.
Cairngorm, the framework with the funny name (unless you are either Scottish or are familiar with the Cairngorm Mountains in Scotland) , has appeared somewhat daunting to me. I could be a better actionscript programmer and while I am actively working to improve my skills I haven't felt the pain of not using a framework for my Flex applications so far.
On Feburary 15th, Michal Glowacki, a senior Flex programmer at MotionBox gave a presentation on 'Moving to Cairngorm' to an extremely packed New York Flex User group. Michal showed examples of a simple Flex application built using different methods. Next he touched on the difficulties in maintaining applications built by different developers with different interpretations of Flex.
Following that, Michal build a simple Flex application using the Cairngorm framework in 15 minutes. Watching this process was the perfect demonstration of how the framework parts fit together. Whereas before, I was confused on how to apply the Cairngorm terminology to my applications, I am now quite clear on how Cairngorm applications function and work. I have newfound love and respect for the Cairngorm framework!
Keeping track of state, events, services models, etc.. add to the code clutter in an application. Using Cairngorm will alleviate a lot of the noise and messiness in Flex source code. At least, in my Flex application source code ;)
You can find some interesting articles on Cairngorm here
Thank you Michal for your excellent presentation on Moving to Cairngorm and thank you to Shlomy Gantz for his continual efforts in making NyFlex the premier Flex User group.







Also, FWIW, I thought the framework was named after the type of crystal found in those mountains and not the mountain range itself.
Your articles are always clear and insightful and I am glad to hear you have an article on Cairngorm coming out soon.
As far as the origin of the name, you could very well be right. It would be interesting to know, do you have any links perchance?
@notboss
I use the singleton pattern in my regular back-end development and find it offers some distinct advantages. In ColdFusion, object creation can be a little heavy at times and caching an instantiated service component or other singleton makes a difference in performance. Since ActionScript 3 is compiled and strongly typed, I doubt the performance benefits carry over. Can you be more specific about how you feel about the singleton pattern being an anti-pattern? In what ways do you feel the Cairngorm usage of the singleton pattern is incorrect?
I welcome all thoughts and don't pretend to have all the answers on this one...
dw
I'm very skeptical about ModelLocator and FrontController. I don't believe a single global model is a scalable idea in a medium, let alone large, application - even with only 5 different screens. And I dont believe it is scalable to centralize all state management in one place. In general I prefer dependency injection and hierarchical state management. Still, some people seem to like Cairngorm so I'm anxious to see/read more about how they are actually using it.