关闭

命名规范

标签: radiobuttondatagriddateparametersimageparallel
465人阅读 评论(0) 收藏 举报
分类:

 A Proposal: Code Standard for IIR Flex Projects
Started by Andy, August 20th, 2007
Last updated by Andy, August 21st, 2007
Purpose: to make our source code easier to maintain.

Content List
1. Event Handler 3
2. Database 3
3. File Name 3
4. Folders 3
5. Naming 4

1. Event Handler

? For built in event, we use the name_event:

<mx:Image id=”imgTest1” click=” imgTest1_click()” mouseDown=” imgTest1_ mouseDown ()”
mouseOut=” imgTest1_ mouseOut ()”/>

? Naming of event parameters: event
private function btnTest(event:Event):void {

? Self defined event:
<mx:Metadata>[Event(name="EventUpdated", type="flash.events.Event")]</mx:Metadata>


2. Database
? Database field name:
Company_Product
Product_Attribute


3. File Name
? Start with upper case:
RendererLogin.mxml

 

4. Folders
There will be folders:
? Image
? Flash
? Swc

5. Naming
Names and Prefixes

Prefixes tell what type of variable or component.

Array: a
ArrayCollection: ac
ApplicationControlBar: bar
Accordion: acd
AreaChart: chart
AddChild: add
BarChart: chart
BubbleChart: chart
Button: btn
ButtonBar: bar
Boolean: b
CandlestickChart: chart
ColumnChart: chart
ControlBar: bar
CheckBox: cbx
ComboBox: cmb
Class: NO PREFIX (or cls)
ColorPicker: color
Canvas: cvs
DateField: date
DateChooser: date
Date: date
DataGrid: dg
DataGridColumn: dgc
dataProvider: NO PREFIX
Error: err
FileReference: file
Form: frm
FileSystemComboBox: cmb
FileSystemDataGrid: dg
FileSystemHistoryButton: btn
FileSystemList: lst
FileSystemTree: tr
Grid: gd
GridRow: gr
GridItem: gi
HTML: htm
HLOCChart: chart
HRule: rul
HSlider: sld
HorizontalList: lst
HDividedBox: hdb
HBox: box
htmlText: txt
FormHeading: head
Iris: ef
Image: img
Int: i
Legend: lgd
LineChart: chart
Label: lbl
List: lst
LinkButton: btn
LinkBar: bar
MenuBar: bar
NumericStepper: ns
Number: f
NumberFormatter: fmt
Object: o (or NO PREFIX)
PieChart: chart
PlotChart: chart
PopUpButton: btn
PopUpMenuButton: btn
ProgressBar: pb
Panel: pnl
Parallel: ef
QiAgent: qi
RichTextEditor: txt
RadioButtonGroup: rbg
RadioButton: rbtn
Resize: ef
String: s
SWFLoader: swf
Spacer: spc
states: NO PREFIX
State: NO PREFIX
SetProperty: set
SetStyle: set
Sequence: ef
TabBar: bar
TabNavigator: nav
Tree: tr
TileList: lst
TitleWindow: win
Text: txtName
TextArea: txt 
TextInput: txt
ToggleButtonBar: bar
Timer: t
Tile: tile
VBox: box
ViewStack: vs
VSlider: sld
VDividedBox: box
VRule: rul
VideoDisplay: vdo
WipeLeft: ef
WipeRight: ef
WipeDown: ef
WipeUp: ef
XML: xml

 

  parentApplication.localObject.CompanyProfile_Name
     Local_Config.local_arrAllLevelInfo

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:288406次
    • 积分:4387
    • 等级:
    • 排名:第6801名
    • 原创:125篇
    • 转载:77篇
    • 译文:0篇
    • 评论:53条
    最新评论