Ok, ok… here is a quick example.
November 16, 2008
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).
November 18, 2008 at 5:33 pm
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
November 18, 2008 at 8:26 pm
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/
November 18, 2008 at 9:33 pm
etweb,
Thanks very much!!
Alberto
November 19, 2008 at 2:16 am
np, happy to help!
June 15, 2009 at 2:16 pm
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?
June 15, 2009 at 5:57 pm
Sorry, I will try to do that, I changed hosting and forgot to move that stuff over.
June 16, 2009 at 10:35 pm
Ok, the links should be back together now. Let me know if you need more help.