Practical conventions
A well-structured Ext JS 4 project with consistent naming conventions will be a joy to work with. Enterprise applications with hundreds of files should be structured in a way that is easy to learn and maintain. It should be a rare occurrence when you ask a colleague, "Where is the file that displays the editing toolbar for the xyz widget?".
Project structure
The Ext JS 4 directory structure, comprising a top-level app and subdirectories named controller
, model
, store
, and view
, should always be used. This is the default directory structure for any Ext JS 4 application and allows out-of-the-box integration with the Sencha Cmd build tools.
Large projects have many hundreds of JavaScript files, so it is important to have a consistent project structure. Practical namespacing, especially in the view
directory, can simplify a project structure and make it easier to find components. In Chapter 10, Logging On and Maintaining Users, Chapter 11, Building the Task Log User Interface...