Working with the store
As mentioned before, a store is a collection of models that acts as a client cache to manage our data locally. We can use this collection to perform tasks such as sorting, grouping, and filtering the models in a very easy way. We can also pull data from our server using one of the available proxies and a reader to interpret the server response and fill the collection.
A store is usually added to widgets/components to display data. Components such as the grid, tree, combo box, or data view use a store to manage the data. We will learn about these components in future chapters. If we create a custom widget, we should use a store to manage the data too. This is why this chapter is really important; we use models and stores to deal with the data.
In order to create a store, we need to use the Ext.data.Store
class. The following example will use the Customer
model that we already have worked, and will extend the store to create a collection of customers:
Ext.define('MyApp...