O'Reilly logo

Learning Ext JS 4 by Armando Gonzalez, Crysfel Villa

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

Creating our first application

Ext 4 introduces the Ext.app.Application class. The main purpose of this class is to define the namespace, where our application will reside, and the point of entry. This code will be executed at the beginning and will be used to start our application.

We can create an instance of the application class manually or even extend it to add any modification or behavior that we need; however Ext defines a method that creates the application instance for us:

Ext.application = function(config) {
    Ext.require('Ext.app.Application');

    Ext.onReady(function() {
        new Ext.app.Application(config);
    });
};

The previous code has been extracted from the Ext JS library. The application method requires the Ext.app.Application class; we don't ...

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