Naming convention in Ext JS.

Naming convention is a set of rule to be followed for identifiers.

It makes code more readable and understandable to the other programmers as well.

Naming convention in Ext JS follows the standard JavaScript convention which is not mandatory but a good practice to follow.

It should follows camel case syntax for naming the class, method, variable and properties.

If name is combined with two words, second word will start with uppercase letter always e.g. doLayout(), CustomerForm, employeeName etc.

Class Naming convention

Clase name start with uppercase letter and followed by camel case E.g. CustomerClass

Method Naming convention

Method name start with lowercase letter and followed by camel case E.g. doLayout()

Variable Naming convention

Variable name start with lowercase letter and followed by camel case E.g.employeeName

Constant Naming convention

Constant name should be in uppercase only E.g. COUNT, MIN_VALUE

Property Naming convention

Property start with lowercase letter and followed by camel case e.g. enableColumnResize = true

Leave a Reply

Your email address will not be published. Required fields are marked *