Touch 2.0.2 Sencha Docs

Using the data package in Sencha Touch 2

The data package is responsible for loading and saving all data in a Sencha Touch app. Most of what you do with the data package has to do with models, stores, and proxies:

  • Model: A model represents an entity your app cares about. User, Contact, Address, and Product could all be models. At its simplest, a model is just a collection of fields and their data, but they can do a lot more.
  • Store: A store is just a collection of model instances. Mostly it's just a glorified array, but it also provides capabilities like sorting, filtering, and grouping, as well as firing useful events.
  • Proxy: Proxies are responsible for all of the actual loading and saving of data. Usually you'll create an AJAX proxy which will fetch data from your server and populate it into a store.

Find out more about Models, Stores and Proxies in their individual guides.

Further Reading

Data is just part of the Sencha Touch 2 ecosystem. To understand more about the framework and how it works, we recommend the following: