Extjs-naming-convention
提供:Dev Guides
Ext.js-命名規則
命名規則は、識別子について従うべき規則のセットです。 他のプログラマーにとってもコードを読みやすく理解しやすくします。
Ext JSの命名規則は、標準のJavaScript規則に従います。これは必須ではありませんが、従うのが良い習慣です。 クラス、メソッド、変数、プロパティに名前を付けるキャメルケースの構文に従う必要があります。
名前が2つの単語と組み合わされている場合、2番目の単語は常に大文字で始まります。 たとえば、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 |