purpose of component and module of flex app
A:
Some quick clarifications
A module is a custom component, coded either in ActionScript or MXML.
A component can refer to
- A Flex component (Those provided with the Flex SDK such as Canvas and ComboBox)
- A MXML component : A file that can be used to extend the functions of a flex component.
In any case they all are designed to do
- Code Reuse - To avoid duplication of work by reusing common components
- Ease of Development - Developers can work on components independently
- Maintainability - Debugging becomes clearer as errors can be isolated
The purpose of a module in specific is to have a customizable component either from scratch or that is extending the functionality of a flex component.
In terms of AS vs MXML components unless composition is occurring (components within the custom component), it would be best to code the custom component in ActionScript.
A really good example would be to check the PureMVC usage of the PureMVC AS3 MultiCore Framework using Flex Modules. There you can see the Flex Modules are called widgets and every Widget is independent from the other.
phwd
2010-06-09 06:32:40