Consuming Data Services
What's In This Chapter?
- Initiating web transactions
- Working disconnected
- Exploring device resource considerations
The previous chapter showed you how to create REST and SOAP services to provide web-based data functionality. From retrieving data (GETs) to saving data (PUTs and POSTs) to deleting it (DELETEs), you perform the functions by consuming these data services.
This chapter provides you with a detailed introduction to RESTful consumption of data services and explains how to ensure that the data your mobile application requires to run correctly is available, even when your network connection isn't available. The chapter also discusses device resource considerations to keep in mind when devising a caching scheme for storing data locally.
Initiating RESTful Transactions
The RESTful services described in the previous chapter present the opportunity for an application to interact with centralized data and functionality that resides on the server. You can call these services from the mobile applications (that is, the consumers of the services) via RESTful web transactions.
These RESTful transactions support each data entity (or business object) to be operated upon in multiple ways via a single Uniform Resource Identifier (URI), aka a RESTful interface. You can accomplish this through the use of HTTP Request Methods or RESTful verbs. There are several RESTful verbs that specifically focus on basic data interactions. Table 8.1 summarizes the verbs ...