MVC Flex applications using Cairngorm
This series caters to individuals who are brand-spanking new to Cairngorm. What is Cairngorm? It’s an MVC framework for Flex: a library of ActionScript classes available for download at Adobe Labs that can help make writing Flex applications easier. Not necessarily faster. But easier, and in my opinion, more enjoyable.
Until all the videos are done for Part One, here are the files from my presentation on 3/11/2008 including the slot machine demo.
Assumptions
- You’re planning on using Cairngorm version 2.2.1 & Flex 3
- You’re familiar with fundamental OOP concepts.
- You’re familiar with the concept of design patterns.
Other resources
Part One: Fundamentals
In the first series of posts we will construct an extremely simple application which consists of a Button and a Label. When the button is clicked we need to increment a Number and display the new value in the label. Let’s get started.
- Moving towards MVC without Cairngorm.
- All future entries utilize the Cairngorm framework - The
ModelLocatorholds application data. - Create a View and bind to application data.
- The View dispatches a
CairngormEvent. - The
FrontControllerlistens. - The
FrontControllerexecutes aCommand. - It works! Let’s do it better with Value Objects and Model Objects.
- Tip one: Always pass targets to Commands.
- Tip two: Make the View as stupid as possible.
- Tip three: Make the View as reusable as possible.
Part two: Services with Cairngorm
tbd