We've compiled an additional 20 recipes with more useful hints and tips to help you to get the most out of Sencha's Ext JS 4 framework. Following the same format as the book, these extra recipes cover a wide variety topics and we hope they further broaden your knowledge of the framework.
Creating your applications folder structure
This recipe will give you Sencha's best-practice application folder structure. By following these guidelines, your application will be well organized, easily maintainable, and sharing components between applications will be straight-forward. In addition to these benefits you can use the Ext JS SDK tools to easily create and deploy an optimized copy of your application when you're ready to go live. We have explained how to do this in the recipe Building your Application with Sencha's SDK Tools, in Chapter 12, Advanced Ext JS for the Perfect App. To illustrate this, we'll create an application to list our project's enhancement log.
Getting ready
We recommend having a web server (for example, Apache or IIS) installed and running on your development computer.
Ext JS 4 Cookbook—Exploring Further
How to do it...
1. If you are not following an MVC pattern for your application use the following directory structure:
enhancementLog
app
enhancement
EnhancementGrid.js
extjs resources
css images .…
app.js index.html
2. If you are following an MVC pattern use the following structure:
enhancementLog
app
controller
Enhancement.js Enhancement.js Enhancement.js enhancement
model
store
view
Enhancement.js
extjs resources
css images
app.js index.html
2
Appendix
How it works... f f
The directory enhancementLog is where you will store the application files The directory app will contain the applications classes (in their respective group's