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

Indiver Nagpal’s ColdFusion-based Contact Manager example February 23, 2007

Posted by Douglas McCarroll in : Cairngorm Code Examples, ColdFusion , add a comment

Created by: Indiver Nagpal

Uses Cairngorm version: 2.0

Supported/maintained by Adobe: No

You’ll find it here.

Note to readers: We (the CairngormDocs community) are using these ‘Cairngorm Code Example’ blog posts as a quasi-wiki for posting examples. What this means is that any and all notes, explanations, comments and opinions relating to this example can be found in this post’s comments. We invite you to contribute!

(Search tags: ColdFusion, Flex)

Nico Lierman’s “Hello World” Example January 19, 2007

Posted by Douglas McCarroll in : Cairngorm Code Examples , add a comment

Created by: Nico Lierman

Uses Cairngorm version: 2.1

Supported/maintained by Adobe: No

You’ll find it here.

Note to readers: We (the CairngormDocs community) are using these ‘Cairngorm Code Example’ blog posts as a quasi-wiki for posting examples. What this means is that any and all notes, explanations, comments and opinions relating to this example can be found in this post’s comments. We invite you to contribute!

(Search tag: Flex)

Sequencing multiple commands December 24, 2006

Posted by Bjorn Schultheiss in : Cairngorm, Cairngorm Code Examples, Flex 2 , 18 comments

In your cairngorm Flex 2 application you may require to string a sequence of commands together. This may occur in your application’s initialization process or in the view from a user gesture.

For example, in the case of an e-commerce application on initialization you may be required to get all categories, sub-categories related to a category and the products related to a sub-category all in one process.

In cairngorm each command requires an event to be fired in order to execute the command. Now where you create that next event to be fired is usually in the subsequent command, prior to setting it to that command’s nextEvent property.

Perhaps this approach may not be suitable depending on your commands (as in one my cases) so i created a utility for chaining events together so that a sequence of events can be fired at the developer’s desire.

To demonstrate a scenario of the usage of this utility i have created a small example (click here and right-click to download source) and an illustration of the example.

Event Chaining Diagram

What i’ve done is create a sub-class of CairngormEvent which has a public property called nextChainedEvent.
Then I’ve create a utility class called EventChainFactory with a method chainEvents, which accepts an array of ChainEvent instances as its only parameter with each event in the array ordered in the order you want your sequence of events fired in. The method returns a ChainEvent instance with each subsequent event set to the next event’s nextChainedEvent property.

Enjoy and dont hestitate to improve it.

Regards,
Bjorn Schultheiss

Chen Bekor’s “CairngormStore with Stub BusinessDelegates” Example December 3, 2006

Posted by Douglas McCarroll in : Cairngorm Code Examples , 2 comments

Created by: Chen Bekor

Uses Cairngorm version: 2.1, 2.2.1

Supported/maintained by Adobe: No

You’ll find the 2.1 version here and the 2.2.1 version here.

Note to readers: We (the CairngormDocs community) are using these ‘Cairngorm Code Example’ blog posts as a quasi-wiki for posting examples. What this means is that any and all notes, explanations, comments and opinions relating to this example can be found in this post’s comments. We invite you to contribute!

(Search tag: Flex)

Derek Wischusen’s Ruby on Rails & WebORB “Issue Tracker” Example December 2, 2006

Posted by Douglas McCarroll in : Cairngorm Code Examples , 1 comment so far

Created by: Derek Wischusen

Uses Cairngorm version: 2.1

Supported/maintained by Adobe: No

This sample app is part of the Flex Ruby On Rails SDK, which you can find here.

Note to readers: We (the CairngormDocs community) are using these ‘Cairngorm Code Example’ blog posts as a quasi-wiki for posting examples. What this means is that any and all notes, explanations, comments and opinions relating to this example can be found in this post’s comments. We invite you to contribute!

(Search tag: Flex)

Benoit Hediard’s “PhonesCairngorm2″ Example November 29, 2006

Posted by Douglas McCarroll in : Cairngorm Code Examples , 2 comments

Created by: Benoit Hediard

Uses Cairngorm version: 2.0

Supported/maintained by Adobe: No

Download it here.

Note to readers: We (the CairngormDocs community) are using these ‘Cairngorm Code Example’ blog posts as a quasi-wiki for posting examples. What this means is that any and all notes, explanations, comments and opinions relating to this example can be found in this post’s comments. We invite you to contribute!

(Search tag: Flex)

Alex Uhlmann’s Login Example November 28, 2006

Posted by Douglas McCarroll in : Cairngorm Code Examples , add a comment

Created by: Alex Uhlmann

Uses Cairngorm version: 2.0

Supported/maintained by Adobe: Yes

Get it here.

Note to readers: We (the CairngormDocs community) are using these ‘Cairngorm Code Example’ blog posts as a quasi-wiki for posting examples. What this means is that any and all notes, explanations, comments and opinions relating to this example can be found in this post’s comments. We invite you to contribute!

(Search tag: Flex)

Jesse Warden’s “WebService & Cairngorm 2″ Example November 25, 2006

Posted by Douglas McCarroll in : Cairngorm, Cairngorm Code Examples, Mashups, WebService , add a comment

Created by: Jesse Warden

Uses Cairngorm version: 2.0

Supported/maintained by Adobe: No

Get it here.

Note to readers: We (the CairngormDocs community) are using these ‘Cairngorm Code Example’ blog posts as a quasi-wiki for posting examples. What this means is that any and all notes, explanations, comments and opinions relating to this example can be found in this post’s comments. We invite you to contribute!

(Search tag: Flex)

Renaun Erickson’s “Switching CairngormStore’s Backend Between AMFPHP & ColdFusion” Example

Posted by Douglas McCarroll in : AMFPHP, Cairngorm Code Examples, ColdFusion , add a comment

Created by: Renaun Erickson

Uses Cairngorm version: 2.1

Supported/maintained by Adobe: No

Get it here.

Note to readers: We (the CairngormDocs community) are using these ‘Cairngorm Code Example’ blog posts as a quasi-wiki for posting examples. What this means is that any and all notes, explanations, comments and opinions relating to this example can be found in this post’s comments. We invite you to contribute!

(Search tag: Flex)