Ext.app.Application

Source: Internet
Author: User

A representative ExtJS application, typically a classic single-page application created with Ext.container.Viewport.

A program consists of one or more views (view). The behavior of a view is managed by its corresponding view controller (Ext.app.ViewController) and view model (Ext.app.ViewModel).

The global activity is adjusted by the controller (Ext.app.Controller), which is basically instantiated by an instance of the following class (or its subclasses).

This instantiation process consists of several steps. First, it creates a global variable called "MYAPP"-all the classes in your program (such as its templates, views, and controllers) will be located under this namespace. This will greatly reduce the likelihood of a global variable naming conflict.

Because a Ext.app.Application represents the entire app, we need to set up the rest of the app here-that is, the model, view, and controller that binds to the program. For example, we have a blog management program; we may also have templates and controllers for posting and commenting, to list, add and edit views of posts and comments. Here are all the things we want to configure in application.

Configure some controllers that need to be loaded by the file, Ext.container.Viewport, this is something that must be loaded.

Note that we do not list the views directly in the program. This is because the view is managed by the controller, so it is advisable to keep this dependency. The program loads each declared controller according to the path control contract, which is listed in the Program schema guide-so that the controller will be located under Paths App/controller/home.js and App/controller/lancablectrl.js. In turn, each controller simply lists the views it uses, and they are automatically loaded.

When the view and model files are listed in the controller, they are automatically loaded.

Ext.app.Application

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.