AI教程网 - 未来以来,拥抱AI;新手入门,从AI教程网开始......

Ext.js 命名约定

Ext.js教程 AI君 52℃

命名约定是标识符要遵循的一组规则。

它使得代码对于其他程序员也更可读和可理解。

Ext JS中的命名约定遵循标准JavaScript约定,这不是强制性的,而是遵循的良好做法。

它应该遵循camel case语法命名类,方法,变量和属性。

如果name与两个单词组合,则第二个单词将始终以大写字母开头。 doLayout(),StudentForm,firstName等。

名称 惯例
Class Name

它应该以大写字母开头,然后是camel case E.g. StudentClass

Method Name

它应该以小写字母开头,然后是camel case E.g. doLayout()

Variable Name

它应该以小写字母开头,然后是camel case E.g. firstName

Constant Name

它应该是只有大写,例如 E.g. COUNT, MAX_VALUE

Property Name

它应该以小写字母开头,然后是camel case e.g. enableColumnResize = true

转载请注明:www.ainoob.cn » Ext.js 命名约定

喜欢 (0)or分享 (0)