Over 4 months without an update.. I’ve been a busy boy.

Current status.. The first leg of developement is coming to completion.

Here are some keypoints before i get into some more detailed posts.

– Flex, Java and Remoting rocks! Cant wait to get into FDS
– Cairngorm is a great starting point for any flex developer.
– Get your head around Flex component delvelopment techniques before doing any real ria view work.
– Modules lack framework support. Dive in, the engineers are more than glad to answer questions but i will wait for Flex 3.0 until i re-implement Modules into our RIA.
– And finally, test, test, test. Make sure your got a production spec server to test on as well ( 1 that will mimic your deployment set-up ).



Sequencing multiple commands

24 December, 2006

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.

Bjorn Schultheiss

This is my introduction post for a weekly series of articles based around my experience of developing my first Enterprise Flex RIA. Through the development process I am recording short notes and then composing weekly articles based from these notes. I will be posting 2 articles each week, one will be posted on cairngormdocs.org which will be related more to the implementation of the cairngorm architecture in this application while the other article posted on this blog will be about the overall picture.

To begin with, I am not going to be disclosing too much detail of the purpose of the application and will not be releasing any source code, although I may include snippets of code to help illustrate certain areas of the articles.

The RIA is a pure Flex 2 GUI and the backend server application is built in Java. Our front-end team currently consists of 2 Flex Developers with another developer coming on board in a couple of weeks and hopefully more in the future.