Cairngen 1.2: From 0 to Cairngorm in 10 seconds (well almost) July 23, 2007

Posted by Mark Ellul in : Cairngorm, Flex 2 , 1 comment so far

Cairngorm Version: 2.2 and below…
Introduction:

I don’t know about you all, but setting up my first cairngorm app was daunting to say the least.
I have set up a few Flex applications now using Cairngorm, and I found the most useful utility I have ever used to help setup a new Flex Application to use cairngorm had to be Cairngen.


Cairngen

Cairngen, found at the above link was created by Eric Feminella, a talented and generous engineer (as cairngen is free) which uses Ant in Eclipse to generate:

  1. The directory structure for you commands, events, views, model, vo’s and business logic.
  2. The Classes used for most parts of your appliction.

Installation

1. ANT - First make sure you have ant installed inside of your Flexbuilder or Eclipse programs..

Flexbuilder - Peter Elsts offers instructions on how to do so on his blog click here

Eclipse - There are plenty of links on how to do this, if you find any that are particularly useful, please post it in the comments.

2. Cairngen - Cairngen can be downloaded at the above link and is simple to install… Extract it into your flex application folder. I am not going to go into details as they are explained on Eric site..

NOTES:

  • I am not an journalist, and even though english is my first language, I prefer computer languages ;o)
  • When editing your project.properties, you can only create one command sequence and VO at a time, so you will find yourself editing that file over and over again… which is still better than doing it from scratch.
  • Eric uses a template approach, so if you want to make your commands or delegates inherit from different classes.. You can change the template necessary.

Summary

I hope this helps you in your cairngorm endeavours. It certainly has helped me.

P.S

I hope to be doing some more posts in the coming future

Regards

Mark Ellul