Chapter 7. Data stores and views

 

This chapter covers

  • How data stores work with models, proxies, and readers
  • Using DataView
  • Exploring lists
  • Digging into nested lists

You’ve learned quite a lot so far about how to work with Panel and Sheet, and you can build a great-looking application. But the application you’re able to build so far is static and may need to consume or save remote data. Say you’re tasked with building a mobile viewer so that anyone in your client’s company can search a global address book and find contact information while they’re traveling. You’ll likely want some sort of list that will load the contact list from a remote server. Building such a list might sound complicated, and it is, but Sencha Touch makes it easy to achieve.

In this chapter you’ll explore Ext.data.Store and the classes it uses to send a request to a server and read the response. We’ll also look at displaying this data in Ext.DataView.DataView and Ext.DataView.List, and you’ll learn when to use them.

Before we jump into using the widgets you need to learn about data stores. A list can’t display anything without a data store, so let’s begin with an overview of what a data store is and how it works.

7.1. Examining data stores

7.2. Implementing DataView

7.3. Advanced features with List

7.4. Displaying hierarchical data with NestedList

7.5. Summary