O'Reilly logo

Professional Cross-Platform Mobile Development in C# by Kenny Goers, Ben Horgen, John Hunter, Scott Olson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required