On the Characteristics of ExtJS-5.0, on the characteristics of ExtJS-5.0

Source: Internet
Author: User

On the Characteristics of ExtJS-5.0, on the characteristics of ExtJS-5.0
ExtJS5
# Using MVVM, using ViewModel and DataBind, declarative style, separation of focus
# A little like the Spring framework. Developers pay attention to various objects (Model, Store, View, ViewModel, and ViewController ),
The interaction and collaboration of these objects are handled by ExtJS.
# Sencha CMD is a command line tool that manages the lifecycle of an Ext project. It can be used to create (genenrate), compile build, and listen to watch
# A Model describes an object, including the name and field type. In addition, it can have data logic, such as verification and type conversion.
# A Store usually contains a Model (data format), a Proxy (how to obtain data), and a Reader (how to convert data)
# A View usually represents a Component, such as Grid, Tree, Panel, iner, and ViewPort. These components can be used as View instances.
# A ViewModel serves a specific View and provides appropriate data for the View
# A ViewController monitors events for a specific View and implements business logic in the callback function.
# View binds the viewModel through the ViewModel attribute. You can specify the bind attribute in the View to extract the binding content in the ViewModel.
# View binds ViewController through the controller attribute. The relationship between ViewController and View is one-to-one,
The life cycle of ViewController is the same as that of View. If View is destroyed, ViewController is also destroyed.
# ExtJS5 use Ext. define (...) to define a subclass and Ext. create (...) to create an instance,
In this way, you can delay and load the required components as needed to solve the performance of the framework at startup. Do not use the new keyword to create objects in the future.
# In the event listening function of ExtJS5, obtain the new methods of other components in the current View,
Define a reference attribute on the target component and use the lookupReference function to obtain the reference attribute.
It is more stable than Ext. getCmp () based on the id attribute, because you cannot ensure that the id selection is not repeated in large team projects.
It is faster than itemId-based refs query because it does not pass the query and uses the internal registration and cache mechanism.
# Bind dynamic binding is higher than static settings. For example, if a Component title is set to either a static value or a bind, bind wins.
# ViewModel not only provides the data attribute for the View to bind, but also provides the formulas attribute for secondary construction of data,
Similar to the design of rich objects, so that the View can focus on the presentation structure
# Assign a sub-ViewModel to each sub-View, instead of stacking all the data in the parent ViewModel,
In this way, when the child View is destroyed, the data in the Child ViewModel can also be released.
Of course, this requires that the data in the Child ViewModel be useful only to the Child View.
# In a single page Application Based on ExtJS5, When you switch the forward and backward buttons of the browser, Ext is actually identified by parsing the changes in the hash segment in the URL

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.