Modified Cairngorm Store

The Modified Cairngorm Store is based on the Cairngorm Store (version 2.1).
This release include support for mockups – (no flex data services/java).

Changes made:

1. Added class BaseBusinessDelegateMock – this class is a base class for all business delegate mockups.

2. Added classes ProductDelegateMock (for product fetching) and CreditCardDelegateMock (for credit card validation)

3. changed class GetProductsCommand to call ProductDelegateMock

4. changed class ValidateCreditCardCommand to call CreditCardDelegateMock

5. added a visa credit card number to pass basic mx validation 🙂

After downloading – please rename to *.zip, extract and open readme.txt for more information.

update (22, feb. 2008) : Please check out Douglas McCarrol’s update to the Modified Cairngorm which includes support for Flex 3!

Happy coding,

Chen Bekor.


23 Responses to “Modified Cairngorm Store”

  1. Douglas McCarroll Says:

    Hey Chen, thanks! I’ve been having problems getting the store installed and running (even though I had it working a month ago) and this is a good shortcut.

    Douglas McCarroll

  2. Barton Listick Says:

    Bless you for this! I’m trying to wrap my mind around Flex and Cairngorm (by playing with the store example, of course) and didn’t want to also tackle the data services and java stuff right now.

    Also, I greatly appreciate the fact that you included a readme file with installation instructions.


  3. Serge Says:

    Hi Chen.
    It was a great idea to decouple the sample app from data services that are not really necessary for getting the essense of the framework at the first steps. You made installation and build of it just a breeze. Thanks a lot!

    Unfortunately it is not the case with the original CairngormStore project and also with the Cairngorm 2.1 library itself.

    I am just wondering if you encountered the same problems bulding the Cairngorm 2.1 as I did.

    First it was a build error about the missing folder ‘C:\dev\swat\projects\ac_emea\Cairngorm\buildlib’. That was somehow resolved just by creating this empty folder. I am not sure that this is not a right fix although it eliminates the error message.

    After that there was another error message:

    1046: Type was not found or was not a compile-time constant:DataService.

    Probably you are a couple of steps ahead of me and can share your experience of making a clean build of Cairngorm 2.1?

  4. Thom Says:

    I’ll try this out. Thanks Chen.

    Serge, I ran into the same build error msg and simply removed that buildlib.

    You might already know but you may not need to build the original 2.1, simply put the bin/*.swf from the zip file into a some local directory as a library. Then add this library to the application’s (e.g. webstore) library list. I was able to run the sample web store (almost). It ran but could not load the products so I’m still debugging that ;).


  5. Thom Says:

    Well, I just tried it out and worked like a charm. Now only wondering why the original store could not load the products. I’m guessing something about my web services not working properly.


  6. Dave Says:

    Worked GREAT! THANKS.
    As a side note, after working thru the examples I do see how it could have pointed to a local XML file to get the data, but I see that you are just populating an array locally. What would help me put it all together is if you could help me figure out how to integrate it with my local ColdFusion Server. If I were to build a replica of the data structure in a Sybase DB that I can get to via CF7, then making the data into XML (similar to the second code box in this example
    ). Would I use some kind of RemoteObject or HTTPService ?

  7. Jules Says:

    Nice one bro. Works great!

  8. Jules Says:

    Actually, I spoke too soon. Strangely, I received an error on startup saying “illegal override in mx.messaging.Consumer”.

    If you get this problem, untick Project->Properties->Compiler->Require Flash Player Version. Works great after that (honest!)

  9. james Says:


    this is brilliant. just works for me out of the box so to speak. exactly what I wanted – a simple example of cairngorm

    I love you

  10. Daz Says:

    Thanks Chen. This is awesome.

    I’m not sure I love you as much as James – more of a feeling of deep gratitude.

  11. Donncha Carroll Says:

    Finally, someone with a working version. Thanks so much.

  12. Dan Arad Says:

    Thanks. This really helps.

  13. FlexAbility » Blog Archive » Updated: Chen Bekor’s ModifiedCairngormStore Says:

    […] Bekor performed a real service when he created a modified CairngormStore example that decoupled the application from its data services, replacing them with mock objects, back in […]

  14. Douglas McCarroll Says:


    I just updated your example for Cairngorm 2.2.1 and Flex 3 and have posted the new version at

    I’ve properly credited you and hope that it meets with your approval. If so, you might want to also allow users to download the file from this post.

    I’ll also update the examples listing on CairngormDocs.

    Thanks again for creating this example!


  15. remi Says:

    Here is a Cairngorm Store which uses HTTP Service to get product.

    get the source here.

  16. Adobe Flex - Cairngorm « Panduramesh’s Weblog Says:

    […] Example :: Uses mock delegates so that you can explore the example with a Java server, etc. :: Cairngorm 2.1 version :: Cairngorm 2.2.1 […]

  17. new « Panduramesh’s Weblog Says:

    […] that you can explore the example with a Java server, etc. :: Cairngorm 2.1 version :: Cairngorm 2.2.1 […]

  18. anil4it Says:

    […] Example :: Uses mock delegates so that you can explore the example with a Java server, etc. :: Cairngorm 2.1 version :: Cairngorm 2.2.1 […]

  19. Anilkumar Says:

    […] Example :: Uses mock delegates so that you can explore the example with a Java server, etc. :: Cairngorm 2.1 version :: Cairngorm 2.2.1 […]

  20. Flex with Cairngorm « It’s all about RIA Says:

    […] Example :: Uses mock delegates so that you can explore the example with a Java server, etc. :: Cairngorm 2.1 version :: Cairngorm 2.2.1 […]

  21. It’s all about RIA Says:

    […] :: CairngormStore 2.1 :: Modified by Chen Bekor so that it uses stub BusinessDelegates and doesn’t require Flex Data […]

  22. Adrian Sule - My random thoughts on Flash and Flex » Cairngorm data mock/stubbing Says:

    […] can also see how Chen Bekor’s has done the stubbing in his example application with the Cairngorm […]

  23. Cairngorm Store with added Presentation Model Says:

    […] Original app is this one: 'Modified Cairgorm Store' created by Chen Bekor – which is an example of Cairngorm without using the Presentation […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: