The carding of some basic concepts of "ExtJS"

Source: Internet
Author: User

Learning ExtJS for a while, some of the relevant knowledge points although every day in use, but if the fierce one asked up or will be a leng, while now well combed under it. Long-term modifications added, to find out what to add.

1, Ext.onready ():

The Onready () method is an alias for the Ext.loader.onReady () method. This method is used to monitor the EXTJS and whether the HTML page is loaded. When everything is loaded, execute the method specified by Ext.onready ().

Ext.onready (object FN, object scope, object options)

Where the parameter fn Specifies the method to execute after the load is completed, the scope of the parameter scope specifies the range of the method (FN), and the third method performs additional options. such as: Delay. Parameters 2, 3 are optional parameters.

2 Rendering Render:

Rendering refers to a process in which a page containing a ExtJS program is fully displayed in the browser after it has been downloaded.

As a normal HTML page also has the process of rendering, that is, HTML and CSS code to start loading into the browser to the entire page based on HTML and CSS rules completely display the process. But in the ExtJS there is a completely different from the HTML and CSS rendering process, although the ExtJS interface is finally shown in HTML and CSS, but these HTML and CSS is not downloaded from the server, but entirely by the ExtJS engine dynamically generated. So the rendering of ExtJS is actually a dynamically generated process, not a static loading process.

3 window:

The window in ExtJS is not a real Windows window, essentially a layer that is formatted with CSS and looks and behaves like a real Windows window display area. When it comes to display areas, you should think of panels, which are actually inherited from the panel component at the ExtJS inheritance level. Understand that the essence of the ExtJS window is a layer, then you must know that it is not the same as the real Windows window, such as to drag the ExtJS window outside the browser window, and so the idea is obviously not possible.

4, Ext.define ():

Used to define or extend a class.

Ext.define (String className, Object data, [Function Createfn]).

Built-in 3 parameters, including class name (ClassName), Object data logic and method (data), callback function;

Both the Ext.define () method and the Ext.extend () method are used for custom classes, but it is not recommended to use Ext.extend () after version 4.0. The second argument is an object that specifies a property for the newly created class that can specify any legitimate properties:

Self: references the current class itself;

Alias: Define the category name;

Config: Used to specify configuration options for this class, ExtJS automatically adds setter methods and getter methods to the options specified by CONFIG.

Extend: Used to specify the parent class for which the class inherits;

Statics: Used to define static methods and properties for the class;

Mixins: List all the classes to be mixed;

Override: Defines the class to overwrite;

Requies: Used to list classes that must be preloaded before instantiation;

Singleton: If this property is true, then the class is singleton;

Uses: Used to list classes that must be used with colleagues of this class.

5, Ext.data.proxy.Proxy:

The role of the agent is to load and save data. It can be used in the store or directly in the model, but it is generally recommended to use only in the store, and the model as a pure entity link to use, so that its class contains only the fields, master-slave table correspondence and validation and other basic information, the proxy into the store.

Model represents some of the objects that the application manages. The model is defined as a collection of fields, arbitrary methods, and model-related properties.

The store's responsibility is to encapsulate the model and configure the agent to read and save the data. It has the ability to sort, filter, and group.

6, Ext.create ():

Used to create an object.

var a = ext.create (String name, Object args)

The first parameter is the class name that specifies the object to be created, and the second parameter is a JavaScript object that is used to pass in the constructed parameter value to the newly generated object (also a configuration option, you can specify an option for the Config property to pass in the parameter value).

After the 4.0 release, it is recommended to use ext.create instead of new to create an instance of the object.

The carding of some basic concepts of "ExtJS"

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.