When we start the development of a new Ext JS project, the first thing we have to do is to add the imports of Ext JS files on the HTML page. If we choose a version of the ext-all file, the browser will load the entire Ext JS framework. If we choose a version of the ext.js file, the browser will load the minimum code required to execute the application, and we can make use of the new dynamic loading feature.
For development and testing, we can use ext.js, because it will use only the required Ext JS code to run the application; but, we cannot forget to add the src folder to the application extjs directory. For production, we can use the ext-all.js file, because it already contains the entire Ext JS framework and has good performance.
There is also a file named bootstrap.js; instead of importing ext-all.js into your HTML page, you can import bootstrap.js. The only thing that this file does is import ext-all.js or ext-all-debug.js, depending on the environment you are using. It will load ext-all-debug.js in the following cases:
- Current hostname is localhost.
- Current hostname is an IP(v4) address.
- Current protocol is a file.
- Otherwise, bootstrap will load the ext-all.js file.
0 comments:
Post a Comment