Book Image

Learning Ext JS_Fourth Edition

Book Image

Learning Ext JS_Fourth Edition

Overview of this book

Table of Contents (22 chapters)
Learning Ext JS Fourth Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Retrieving remote data


So far, we have been working with local data, and hard-coding our information to create a store of records. But in real world applications, we will have our data in a database, or maybe we'll get the information using web services.

Ext JS uses proxies to send and retrieve the data to and from the source. We can use one of the available proxies to configure our store or model.

Proxies in Ext JS are in charge of handling the data/information of a data model; we can say that the proxy is a class that handles and manipulates the data (parsing, organizing, and so on), so the store can read and save or send data to the server.

A proxy uses a reader to decode the received data, and a writer to encode the data to the correct format and send it to the source. We have three available readers to encode and decode our data: the Array, JSON, and XML readers. But we have only two writers available; only for JSON and XML.

There are many types of proxies at our disposal. If we want to...