What are the recommended prefix naming conventions for components in Flex 3?

I am looking for a standard way to name components in my Flex application. For example, all TextField begin with "txt" in their ID attribute (ie, "TxtFirstName"). Instead of reinventing the wheel, is anyone familiar with a list of prefix naming conventions that I can use?

+4
source share
2 answers

There is no prefix agreement that Adobe recommends because they use the fully qualified name of the component in the component instance name.

For example: usernameTextInput, userComboBox, etc.

If you want to include this type in the name, make it the last "word". Do not use the old ActionScript 1 convention to concatenate abbreviated type suffixes, such as _mc to indicate type. For example, name the border Shape border, borderSkin, or borderShape, but not border_mc.

Additional information: http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions#CodingConventions-Naming

If you really want to use prefixes, you can use VB prefixes: http://www.rwc.uc.edu/cook/VBI_PREFIXES.HTM

+5
source

Check out Adobe Flex Coding Conventions . Most of the flexible code that you see remains true to this coding standard.

+1
source

All Articles