Extjs learning notes-9 data model (I) _ extjs

Source: Internet
Author: User
This article begins with the best part of Extjs. The data model of Extjs is divided into the following parts:

Data Record
A record in a dataset, including the data definition and value. It is equivalent to an object class.
Data Proxy
The proxy used to obtain data. It is equivalent to Datasource.
Data parser DataReader
Resolves the data obtained by the Proxy and transfers it to the Record and stores it in the Store. It is equivalent to the DataReader of C.
Dataset Store
A set of stored data, similar to the Datatable of C.
The Proxy of Extjs3 has some changes and little information compared with the previous version. In addition, the official documentation is very concise, so that there is no complete example ...... I try my best to understand ......

1. Data Records
A Data Record generally consists of multiple fields. Fields are defined by the Ext. data. Field Class. Field has rich configuration items, so that we have enough information to process our data in weak languages, mainly including:

Name: field name; defaultValue: default value; type: data type, which can be string, int, float, boolean, date, and auto (default ). I will introduce so much, and I will introduce the rest of them when they are used.

To create a data Record class (note that it is not a specific piece of data), you can use the Ext. data. Record. create method. This method accepts the configuration items of the Field class of an array and returns a constructor. Let's look at an example:

The Code is as follows:


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.