Chapter 7. The data store
This chapter covers
- Using the data store
- Understanding data proxies
- Exploring writers and validations
To create a real-world application, you need a way to persist data. Data persistence allows users of your application to access data between sessions, so the data should be stored on a medium that enables it to be accessed after your application has been stopped and started again.
Data persistence can happen by updating or retrieving the data from the components on screen using Ajax techniques if you’re implementing simple applications. But if you’re creating an Ext JS application that involves advanced interaction logic on the client side, you can use the functionality available in the Ext JS data store.
This chapter begins by taking a bird’s-eye view of the data package. We’ll introduce Ext.data.Store and its supporting classes, including Ext.data.Model. You’ll learn how data flows and how it’s consumed by the data store. We’ll discuss the various data readers and explore data consumption with array, JSON, and XML data.