I recently wrote a sample Flex application — a simple Flex RSS Reader — using Cairngorm.
I find that learning Cairngorm is made easier by looking at simple applications like this one. And the one I wrote earlier — a simple contact manager.
When one looks at how Cairngorm is implemented across multiple applications, one starts seeing common patterns. And that is exactly the point of a framework like Cairngorm.
Learning the framework is made easier by the fact that there is a certain repeatability and consistency in the way a Cairngorm application is structured.
I’ve also setup a Google Code project for the application.
Update (9 March 2011): The project has been moved to GitHub.
Here are the instructions on how to install and setup the application.
Download and Unzip FlexRSSReader1.0.zip
This will create a subfolder: com (containing the Flex code for the application and Cairngorm 2.2 SWC)
Set up the app in Flex Builder
- Create a new Flex project in Flex Builder.
- Select “Basic”
- Specify Project Name: FlexRSSReader and point it to the directory where you unzipped the source file.
- Add the Cairngorm library — Cairngorm.swc — to the project by going to Project > Properties > Flex Build Path > Library Path (tab) > Add SWC. Select the Cairngorm.swc in /com/adobe/cairngorm directory.
- Run the application and you should see the Flex RSS Reader load up in a browser.
Hope you find it useful. Please do drop me note if this helped you, or if you have any suggestions on how to improve it.
Hi Indy,
Thanks for that, the code combined with the cairngorm diagram
at http://www.cairngormdocs.org/cairngormDiagram/cairngorm2_rpc.swf has help my understanding immeasurably.
Great to hear that this helped. The Flex Reader application is simpler than the Contact Manager application, so it is a good starting point. I’ve upgraded it to use Cairngorm 2.2. You can check out the application from the trunk of the Subversion repository: http://code.google.com/p/cfcairngormcontacts/
I’ll be doing a build over the coming weekend and making that available as version 2 of the application.
Hello Indy,
I wanted to take a look at your RSS reader.
Checked out the SVN. Everything fine there.
Created a new Project and attached the code. All great there.
Put in the Cairngorm.swc you distributed.
When I build, I get this error:
1046: Type was not found or was not a compile-time constant: Consumer.
I know why the error is caused.
mx.messaging.Consumer – This class was available in the Flex SDK prior to the Flex Builder 2 Hotifx2 update. Starting with the Hotfix2 update the class is available in the LiveCycle DataServices distribution (class usage is subject to the terms of the LCDS license agreement)
I am using the hotfix2 version of Flex, because I had an error handled by it. Since, I do not use LCDS, I have to run my own version of the Cairngorm.swc build.
I just wanted you to be aware of this and see if maybe you are distributing the enterprise version of Cairngorm, or what situation we have here?
Nice application example, by the way!
Tony
I’ll double-check that it is not the enterprise version. Although it is quite unlikely.
Thanks for letting me know.
Here is the article that talks about the issue we are both having. I use the update in this article.
http://weblogs.macromedia.com/amcleod/archives/2007/05/new_release_-_c.cfm
Should clear it up for you.
The link to download the application for the RSS reader is broken. Could you send it to me at my e-mail address.
Thanks
Hi rfw
I fixed the broken link a while back but forgot to comment. It is all working now.
But having looked at the code, I think I need to refactor it a little more.
Will be posting the new version hopefully soon.