Over 10 years of community discussion and knowledge are maintained here as a read-only archive.
Just create a new Flex Library project to put the shared classes in.At a minimum, you'd have three projects:1) Your main app project,2) Your module project3) Your library project.You'll make both your app project and your module project include the library project in their build paths.-=Cliff>
The Modularity demo has a lot of ground to cover, and the primary focus of it is the communications by interface between the shell and the modules.In a real project you can separate out your modules into separate projects, create a shared 'API' project that has just what needs to be shared between the modules and the shell. Then the client builds in the API library and loads the modules. The modules should be compiled with the API being 'external', not 'merged into code'. The main app merges the API into its code and provides it to loaded modules, so they don't have to be compiled with it.-=Cliff>
I consider that it may be possible to run any module alone, without the core at anytime as much as possible to guarantee a good implementation.
In Flex Builder, when building your module, in the properties page for included libraries, select 'external' instead of the default 'merged into code. Why? Think about it. If you have two modules and the shell, and they will all use the same VO, then if you compile them with the 'merged into code' option, you'll be loading the same class three times by the time the third module is loaded. Generally not desirable.And it is not always true that the shell should be the smallest and the modules larger, in fact it may often be the other way around, since the shell often includes all the shared stuff *including* Flex, PureMVC and Pipes.-=Cliff>
And it is not always true that the shell should be the smallest and the modules larger, in fact it may often be the other way around, since the shell often includes all the shared stuff *including* Flex, PureMVC and Pipes.
when you say that each module may run alone, in my case, it's not possible cause i get content and relation between shell and modules with pipe... so when i launch my module .swf, it doesn't display anything..