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).