CairngormModule Example

This is in no way a tutorial on Cairngorm… in-fact, the use of Cairngorm here is really rough. This is however an Application, using Cairngorm, that is split into Flex Modules. The important thing is the use of a Cairngorm implementation within the modules. 

For brevity I’m not using services. There are some important considerations with services and delegates. You can easily define the BusinessDelegates in the module package but in the structure I have shown, you must define the services in the main application.

In actual development, I use a custom implementation of ServiceLocator so that each modules can inject their own Service Objects. This gives me the ability to dynamically load modules at run time and makes the configuration stay where it belongs.

I hope that this small example helps people. I will probably move on to the architecture that I use most now, MVP (Model View Presenter).

7 Responses to “Ok, ok… here is a quick example.”

  1. alberto Says:

    Is it possible to get the source code of the CairngormModule Example? I right click on it and there is no way to see the source. Very interesting article especially about the use of IOC.

    Thanks,

    Alberto

  2. etweb Says:

    Sorry about that, it will take me a while to get that out there, but you can access the code view directly via:

    http://gcisinc.com/test/wordpress/cairngormmodules/srcview/

  3. alberto Says:

    etweb,

    Thanks very much!!

    Alberto

  4. Florian Binder Says:

    I looked everywhere 2 find some usefull information about Cairngorm and Flex Modules. And now when I finially find an example that looks promising, the Link doesn’t work.

    Is there anyway you could e-mail me the example?

  5. etweb Says:

    Sorry, I will try to do that, I changed hosting and forgot to move that stuff over.

  6. etweb Says:

    Ok, the links should be back together now. Let me know if you need more help.


Leave a Reply