13. Organize ActionScript classes
You can use the following structure as an example:
1) Initial comment. (Author, version, copyright, code license, and so on).
2) Package declaration
3) Import statements
4) Class-level metadata tags: Event, Style, Effect (with comments!)
5) Class or interface implementation ASDoc comment
6) Class or interface statement
7) Static variables
1) Public
2) Protected
3) Private
8) Instance variables
1) Public
2) Protected
3) Private
9) Constructor
10)Getter/setter methods (with backing variables)
11)Methods, grouped according to functionality
14. Organize MXML documents
1) XML Declaration
2) Root XML element with namespaces used in XML document
3) Metadata tags: Event, Style, Effect
4) Style element, should link to an external CSS file
5) Script tag; follow the standards outlined in this article in the Best practices for ActionScript class file organization
section.
6) Data related MXML elements, XML, Model, etc.
7) Transitions elements
8) MXML UI controls and containers
15. FlexPMD
● Unused code
● Inefficient code
● Over-complex code
● Over-long code
● Incorrect use of the Flex component lifecycle