📅  最后修改于: 2020-10-25 11:14:28             🧑  作者: Mango
命名约定是标识符要遵循的一组规则。它也使代码更易于其他程序员阅读和理解。
Ext JS中的命名约定遵循标准的JavaScript约定,这不是强制性的,而是遵循的良好实践。它应遵循驼峰式语法来命名类,方法,变量和属性。
如果名称由两个单词组成,则第二个单词将始终以大写字母开头。例如,doLayout(),StudentForm,firstName等。
Name | Convention |
---|---|
Class Name | It should start with an uppercase letter, followed by camel case. For example, StudentClass |
Method Name | It should start with a lowercase letter, followed by camel case. For example, doLayout() |
Variable Name | It should start with a lowercase letter, followed by camel case. For example, firstName |
Constant Name | It should be in uppercase only. For example, COUNT, MAX_VALUE |
Property Name | It should start with a lowercase letter, followed by camel case. For example, enableColumnResize = true |