Hi Christophe,
Below are my thoughts
In general Modules are classes just like application files.One key point about Module "By default, a module is loaded into a child domain of the current application domain". Meaning "Because a module is loaded into a child domain, it owns class definitions that are not in the main application's domain"
Why?
Simple answer is child Application domain can be unloaded. That's the core benefit of it.
Scenario 1:
"All class definitions inside modules are defined in application domain"
I would like to vote for use case 1(No config is needed) Autowire for modules if and only if all the class definitions in modules are defined in application domain.
Scenario 2:
"All class definitions inside modules are not defined in application domain"
Then it should be configurable as per need basis for auto wiring for modules then i would like to vote use case 3(certain modules to use autowiring to access objects from the application context.)
Scenario 1 Vs Scenario 2:
I think Scenario 2 is overall safest bet.. because if we allow scenario 1 there might be cases where some class definitions are found in both two modules but not defined in application domain, First Module alone registers that classes (First Come First Serve) if another module tries to access the same class then we get Flash Player exception, one good example is definition of Managers(PopupManager,DragManager etc) definitions are found inside one module not defined in application domain then another module tries to access same Manager classes then Flash player will throw an exception.
It should be treated case by case basis whether all the module class definitions should appear in application domain or some appear in application domain that are commons while specific ones will appear inside module itself.
So scenario 2 will solve the above problem by allowing the user configuration. So finally i vote for use case 3(certain modules to use autowiring to access objects from the application context. We should also take a look at feasibility of addressing both scenarios will be of great benefit.
How about RSL's?
No worries, because all RSL's are loaded in parent application domain so we don't need to worry about auto wiring for it
Regards,
Santosh Kumar