tags:

views:

16

answers:

1

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

  1. A Flex component (Those provided with the Flex SDK such as Canvas and ComboBox)
  2. 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

  1. Code Reuse - To avoid duplication of work by reusing common components
  2. Ease of Development - Developers can work on components independently
  3. 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