O'Reilly logo

Ext JS Essentials by Stuart Ashworth, Andrew Duncan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The magic behind Ext.Loader

In the last section, we saw an example of how class source files can be automatically loaded into the application as and when they are needed. This is taken care of by the Ext.Loader class, which analyzes the dependencies of each class defined and ensures every reliant class is loaded in via AJAX. For more details on how this relates to creating production builds, see the Creating our application with Sencha Cmd section of Chapter 1, Getting to Know Ext JS.

The class definition process

The following diagram shows the process of how a class is defined, starting with the Ext.define method call, and how the Loader class fits into this process:

Defining dependencies

The best way to ensure that all necessary classes have loaded ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required