Three cheers for Cairngorm!
October 11th, 2007
“Architecture is the learned game, correct and magnificent, of forms assembled in the light.” – Le Corbusier
I’ve been working on a project for the past few months which involves porting a Flash/AS2 application to Flex/AS3. With any new technology, there’s always a bit of a learning curve. The concept of MXML in Flex was familiar because of my research into Microsoft’s XAML technology, but it wasn’t immediately obvious to me how to build a clean interface between my MXML components and AS3 business objects. I dug into this book: Programming Flex 2: The comprehensive guide to creating rich media applications with Adobe Flex (Programming), and I started building various toy applications to get acquainted (mostly with the object model). Finally I started building out the client’s application.
During implementation I caught myself implementing various design patterns, and I started wondering if there was an existing framework to make use of. It turns out that there is. The Cairngorm Microarchitecture provides a fantastic MVC framework for developing RIAs. It also addresses an issue that I’m always worried about, which is maintainability. With Cairngorm, if another developer inherits my application, he will have a much easier time learning his way around the codebase. Even if the developer has no experience with Cairngorm, there is pretty extensive documentation on the framework. Cairngorm builds as a .SWC, so all you need to do is grab the binary distribution and drop it in your build path to start playing around. I recommend starting with the six-part tutorial before splashing around too much.
The developers of Cairngorm have done an excellent job, and I think anyone building with Flex should strongly considering leveraging their work. Cairngorm has significantly reduced the complexity and time to implementation of our project, and I’m very satisfied with it. Give it a try!

Sorry, comments are closed for this article.