Partilhar via


3 - Using Services on the Phone

patterns & practices Developer Center

On this page: Download:
The Model Classes - You Will Learn Download code samples
Download book as PDF

This chapter describes how the Tailspin mobile client uses services offered by the Windows® Phone platform. The chapter begins by describing the various model classes used in the application to represent data within the application. The view model classes described in Chapter 2, "Building the Mobile Client,"make extensive use of these model classes as they manage the data displayed and created in the user interface (UI). This chapter focuses on how the mobile client application uses the isolated storage service on the phone to persist this data, and how the application can populate these model classes with previously saved data. The chapter also discusses issues that relate to data security on the phone.

When the Windows Phone operating system deactivates an application, it's the application's responsibility to persist enough state information to be able to restore the state of the application if and when it's reactivated by the operating system. This chapter describes how the Tailspin mobile client uses the services offered by the phone to support this behavior.

The mobile client application can also send and receive data from the Tailspin cloud service, and this chapter describes how the application synchronizes data between the phone and the cloud. The focus of this chapter is the way that the mobile client application can use services on the phone to help it run the synchronization tasks both in the background and in the foreground.

The chapter also describes how the mobile client application uses other services to pin tiles to Start, and to acquire geo-location data, image data, and audio data.

The Model Classes

You Will Learn

  • About the key model classes used to represent data within the mobile client application.

Chapter 2, "Building the Mobile Client,"described the Model-View-ViewModel (MVVM) pattern adopted by the developers at Tailspin. This chapter relates to the model elements of this pattern, contained in the TailSpin.PhoneServices project, that represent the domain entities used in the application. Figure 1 shows the key model classes and the relationships between them.

Model classes represent domain entities in the Model-View-ViewModel pattern.

Follow link to expand image

Figure 1

The model classes in the Tailspin mobile client application

Next Topic | Previous Topic | Home

Last built: May 25, 2012