Chapter 6

Service Development

WHAT’S IN THIS CHAPTER?

  • Understanding the many choices in service development
  • Learning the three-tier service architecture
  • Understanding Spring and Hibernate: A conservative service stack
  • Building a RESTful web service for contacts
  • Building a synchronization service for contacts
  • Learning best practices for service design

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

Please note that all the code examples in this chapter are available at https://github.com/wileyenterpriseandroid/Examples.git and as a part of the book’s code download at www.wrox.com on the Download Code tab.

This chapter provides a getting started tutorial that enables developers to write their first backend data service — making sure that the service integrates well with Android. The focus is on web service development that supports mobile applications with code running on a backend service host, not in an Android handset.

The discussion addresses mobile computing issues raised in earlier chapters. The following problems hold particular relevance when thinking about backend services for mobile clients:

  • The network is not always available.
  • Scalability requires efficiency in network use and power consumption.
  • Mobile network connectivity is intermittent, slow, or altogether gone (when users drive into tunnels or otherwise off the grid).

The chapter example implements the RESTful contacts interface introduced in the previous chapter, and also explores the patterns from the previous chapter ...

Get Enterprise Android: Programming Android Database Applications for the Enterprise now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.