Chapter 2

Designing Your Service Architecture


  • Implementing a remote façade
  • Discovering endpoints with service locators
  • Supporting older apps with service versioning


You can find the code downloads for this chapter at on the Download Code tab. You can find the code for this chapter in the Chapter 2 download in one example project and one set of web services:

  • Facade
  • Facade

Web services are the lifeblood of a networked iOS app, and the flexibility and robustness of their design has an enormous impact on its user experience. Well-designed service APIs can adapt to changing back-end data sources and still present an unchanging façade to the apps that depend on them. Service locators enable an app to dynamically discover new service endpoints and use them without needing to recompile or resubmit an app to the App Store. When it is necessary to resubmit an app, you need to support older versions of the app during the transition and upgrade process, which may realistically be the entire lifetime of the app. A service API that supports versioning is invaluable when supporting older apps that are still used every day without compromising your ability to offer new features to new versions. This chapter covers example implementations of these invaluable ...

Get Professional iOS Network Programming: Connecting the Enterprise to the iPhone and iPad now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.