user5507535
user5507535

Reputation: 1800

ExtJS class naming conventions

What are the naming conventions for classes in ExtJS?

I have seen models being named MyAPP.model.PersonModel or MyAPP.model.Person the same with the file model/PersonModel.js or model/Person.js

So, what are the conventions for models, views, controllers, utility classes, etc?

Upvotes: 0

Views: 69

Answers (1)

Arthur Rubens
Arthur Rubens

Reputation: 4706

You already have "model" word in the class path, so I am pretty sure you do not need to mention it two times. As a rule: models are singular and stores which are using these models have the same name as model but in plural: model.Person -> store.Persons Controllers has the same name as the views plus Controller postfix: Panel -> PanelController. Controller aliases: better to use full path as a name with '-' or '_' delimiters: myApp.view.MainController -> myApp_view_maincontroller or without myApp.. depends..

Upvotes: 1

Related Questions