« FlexUnit on Adobe Open Source | Main
December 08, 2008
Max Presentation - Flex Development with Cairngorm
At Max Milan last week, I gave a presentation on Flex Development with Cairngorm. The presentation was based largely on the "Cairngorm: Tips and Tricks from the Experts" presentation my colleagues Peter Martin and Eric Garza gave at Max in San Francisco, but after seeing the number of hands raised when Peter asked who was using Cairngorm, I thought I'd change the emphasis (and the content) a bit for the Milan audience.
I wanted to answer a number of common questions surrounding Cairngorm:
* How do I get data from my Commands to my Model?
* How do I get data to my view?
* How can I be notified that new data has arrived on the view?
* How should Responders be implemented?
* How should I use the Model Locator?
So, the presentation is split into three main sections:
1) Cairngorm Overview
The first section is a back-to-basics introduction to Cairngorm, but with a twist. If you've been following some of the Adobe Consulting blogs recently, you'll have seen us talk about the Presentation Model pattern. Another of our consultants, Paul Williams, covered this in his well received series of Presentation Patterns and I show how the Presentation Model fits in with the standard Cairngorm Data Flow.
2) Cairngorm Best Practices
In the second section of the presentation, I provide some Adobe Consulting best practices for the use of Flex and Cairngorm, based on our many and varied engagements on mid to large scale enterprise applications.
The main topics covered are:
* Using the Presentation Model
* Using the Model Locator
* Events, Commands, Responders
* Updating Views with Data
During the talk, I went into detail on the Presentation Model in particular, and how it addresses many of the common questions we hear on handling data in Flex applications.
I also touched on unit testing with Cairngorm, Cairngorm and Modules, and Cairngorm and Data Management Services (part of LiveCycle Data Services).
3) Cairngorm Myths and Anti-Patterns
The presentation also gave me the opportunity to challenge a number of the misconceptions and misunderstandings I have seen on blog posts and architecture face-off discussions at conferences. I also spoke about some of the recurring mistakes we see people make when using Flex and Cairngorm. I covered the following:
* Do I Always Need to use a Framework?
* Do I Need to use every Cairngorm Pattern?
* Business Logic in Cairngorm Classes
* Use of the ModelLocator
* Use of Commands and Responders
* Use of the Controller
I hope to find time to provide more details on these best practices and myths in future blog posts.
At Max San Francisco, Peter Martin also announced the launch of the Cairngorm Plugin for FlexBuilder to allow the quick creation of FrontControllers, Events and Commands. The presentation ends with some details of that, and some road-map details.
My Max Milan presentation can be found on Adobe acrobat.com, here. You can download it via the Download link near the top-right of that page.
Posted by amcleod at December 8, 2008 02:31 PM
Comments
Thanks for helpful presentation and for the slides. I've learned a lot.
Posted by: Michal Gron at December 9, 2008 07:40 AM
Hi there,
I was at Max 2008 Europe but
Sadly i missed your session.
Are there any examples of Cairngorm and Presentation Model witch could be used as a starting point.
Thnx for the slides !!!
Posted by: Pieter Bos at December 10, 2008 01:48 PM
Very good presentation! Is the source code of the refactored Cairngrom demo store (slide 14) available for download?
Posted by: Stefan Schmalhaus at December 10, 2008 04:09 PM
Hi Stefan,
The refactored Cairngorm is actually part of a book a colleague of mine, Tom Sugden, is co-authoring:
http://www.amazon.co.uk/Professional-Adobe-Flex-Joseph-Balderson/dp/0470223642
In the book, he has a number of chapters, including those on frameworks/architecture.
I'll check with Tom whether there's something we can do to release the source code in advance of the book. If not, I'll try get a simpler example together, that exhibits the same ideas I spoke about at Max.
Posted by: Alistair McLeod at December 10, 2008 06:43 PM
