patterns & practices Developer Center

On this page: Download:
Who This Book Is For | Why This Book Is Pertinent Now | How This Book Is Structured | The Example Application | What You Need to Use the Code | Who's Who | Where to Go for More Information Download code samples
Download book as PDF

Windows® Phone provides an exciting opportunity for companies and developers to build applications that travel with users, are interactive and attractive, and are available whenever and wherever users want to work with them. The latest release of Windows Phone furthers this opportunity by enabling you to build many classes of applications that were not previously possible.

By combining Windows Phone applications with on-premises services and applications, or remote services and applications that run in the cloud (such as those using the Windows Azure™ technology platform), developers can create highly scalable, reliable, and powerful applications that extend the functionality beyond the traditional desktop or laptop, and into a truly portable and much more accessible environment.

This book describes a scenario concerning a fictitious company named Tailspin that has decided to embrace Windows Phone as a client device for their existing cloud-based application. Their Windows Azure-based application named Surveys is described in detail in a previous book in this series, Developing Applications for the Cloud on the Microsoft Windows Azure Platform 2nd Edition. For more information about that book, see the page by the same name on MSDN®.

In addition to describing the client application, its integration with the remote services, and the decisions made during its design and implementation, this book discusses related factors, such as the design patterns used, and the ways that the application could be extended or modified for other scenarios.

The result is that, after reading this book, you will be familiar with how to design and implement advanced applications for Windows Phone that take advantage of remote services to obtain and upload data while providing a great user experience on the device.

Who This Book Is For

This book is part of a series on Windows Azure service and client application development. However, it is not limited to only applications that run in Windows Azure. Windows Phone applications can interact with almost any service—they use data exposed by any on-premises or remote service. Even if you are building applications for Windows Phone that use other types of services (or no services at all), this book will help you to understand the Windows Phone environment, the development process, and the capabilities of the device.

This book is intended for any architect, developer, or information technology (IT) professional who designs, builds, or operates applications and services for Windows Phone. It is written for people who work with Microsoft® Windows-based operating systems. You should be familiar with the Microsoft .NET Framework, Microsoft Visual Studio® development system, and Microsoft Visual C#®. You will also find it useful to have some experience with Microsoft Expression Blend® design software and the Microsoft Silverlight® browser plug-in, although this is not a prerequisite.

Why This Book Is Pertinent Now

Mobile devices, and mobile phones in particular, are a part of the fundamental way of life for both consumers and business users. The rapidly increasing capabilities of these types of devices allow users to run applications that are only marginally less powerful, and in most cases equally (or even more) useful than the equivalent desktop applications. Typical examples in the business world are email, calendaring, document sharing, and other collaboration activities. In the consumer market, examples include access to social interaction sites, mapping, and games.

Windows Phone is a recent entry into this field, and it is very different from previous versions of Microsoft mobile operating systems. It has been built from the ground up to match the needs and aspirations of today's users, while standardizing the hardware to ensure that applications perform well on all Windows Phone devices. The result is a consistent run-time environment and a reliable platform that uses familiar programming techniques. In addition, the latest release of Windows Phone brings many new capabilities to the platform, enabling developers to create even better, more immersive user experiences.

Developers can use the tools they already know, such as Visual Studio, to write their applications. In addition, the Windows Phone 7.1 SDK provides a complete emulation environment and additional tools specially tailored for developing Windows Phone applications. Developers can use these tools to write, test, and debug their applications locally before they deploy them to a real device for final testing and acceptance. This book shows you how to use these tools in the context of a common scenario—extending an existing cloud-based application to Windows Phone.

How This Book Is Structured

You can choose to read the chapters in the order that suits your existing knowledge and experience, and select the sections that most interest you or are most applicable to your needs. However, the chapters follow a logical sequence that describes the stages of designing and building the application. Figure 1 illustrates this sequence.


Figure 1

The book structure

Chapter 1, "The Tailspin Scenario," introduces you to the Tailspin company and the Surveys application. It describes the decisions that the developers at Tailspin made when designing their application, and it discusses how the Windows Phone client interacts with their existing Windows Azure-based services.

Chapter 2, "Building the Mobile Client,"describes the steps that Tailspin took when building the mobile client application for Windows Phone that enables users to register for and download surveys, complete the surveys, and upload the results to the cloud-based service. It includes details of the overall structure of the application, the way that the Model-View-ViewModel (MVVM) pattern is implemented, and the way that the application displays data and manages commands and navigation between the pages. The following chapters describe the individual features of the application development in more detail.

Chapter 3, "Using Services on the Phone,"discusses the way that the Windows Phone client application stores and manipulates data, manages activation and deactivation, uses live tiles, synchronizes data with the server application, and captures picture and sound data.

Chapter 4, "Connecting with Services,"describes how the client application running on Windows Phone uses the services exposed by the Windows Azure platform. This includes user authentication, how the client application accesses services and downloads data, the data formats that the application uses, filtering data on the server, and the push notification capabilities.

The appendices cover unit testing Windows Phone applications, and information about the Prism Library that has been adapted for Windows Phone.

The Example Application

This book has an accompanying example application—the Surveys client that Tailspin built to expose their cloud-based surveys application on Windows Phone. You can download the application and run it on your own computer to see how it works and to experiment and reuse the code.

The application is provided in two versions to make it easier for you to see just the Windows Phone client or the combined Windows Phone and Windows Azure application. If you want to try only the Windows Phone client, you can run the simplified version of the application that uses mock service implementations to provide the data required by the client application. You do not need to install the Windows Azure run-time environment and the Windows Azure emulator to use this version.

However, if you want to see the complete application in action, including features that require a back end (like push notifications), and work with the Windows Azure service, you can run the full version. For this, you must install the complete Windows Azure SDK and its run-time components. The example includes a dependency checker application that will assist you in identifying all the prerequisites, and get them installed and configured for this version; it will also help you locate and install any prerequisites that are missing on your system.

To read more and download the application, see "A Case Study for Building Advanced Windows Phone Applications," on MSDN.

What You Need to Use the Code

These are the system requirements for running the scenarios:

  • Microsoft Windows® Vista operating system (x86 and x64) with Service Pack 2 (all editions except Starter Edition) or Microsoft Windows 7 (x86 and x64) (all editions except Starter Edition)
  • Microsoft Visual Studio 2010 Professional, Premium, or Ultimate edition
  • Microsoft Visual Studio 2010 SP1
  • Windows Phone 7.1 SDK
  • Silverlight for Windows Phone Toolkit
  • Microsoft Internet Information Services (IIS) 7.0

The Visual Studio solution uses features such as unit testing and folders, which are not currently available on Visual Studio Express.

To run the unit tests, you will also need:

  • Silverlight unit test framework for Windows Phone
  • Moq for .NET 4

If you want to run the full version of the sample, which uses a Windows Azure service to provide the data and authentication services to the device, you must also install the following:

  • Windows Azure Tools for Microsoft Visual Studio 2010 (version 1.6)
  • Windows Identity Foundation

Who's Who

This book uses a set of scenarios that demonstrate designing and building the Windows Phone client application and integrating it with cloud-based services. A panel of experts comments on the development efforts. The panel includes a Windows Phone specialist, a software architect, a software developer, and an IT professional. The scenarios can be considered from each of these points of view. The following table lists the experts for these scenarios.


Christine is a phone specialist. She understands the special requirements inherent in applications designed to be used on small mobile devices. Her expertise is in advising architects and developers on the way they should plan the feature set and capabilities to make the application usable and suitable for these types of devices and scenarios.

"To build successful applications that work well on the phone, you must understand the platform, the user's requirements, and the environment in which the application will be used."


Jana is a software architect. She plans the overall structure of an application. Her perspective is both practical and strategic. In other words, she considers not only what technical approaches are needed today, but also what direction a company needs to consider for the future.

"It's not easy to balance the needs of the company, the users, the IT organization, the developers, and the technical platforms we rely on."


Markus is a senior software developer. He is analytical, detail-oriented, and methodical. He's focused on the task at hand, which is building a great application. He knows that he's the person who's ultimately responsible for the code.

"I don't care what platform you want to use for the application, I'll make it work."


Poe is an IT professional who's an expert in deploying and running applications in a corporate data center. Poe has a keen interest in practical solutions; after all, he's the one who gets paged at 3:00 AM when there's a problem.

"Integrating our server-based applications with mobile devices such as phones is a challenge, but it will broaden our reach and enable us to implement vital new capabilities for our applications and services."

If you have a particular area of interest, look for notes provided by the specialists whose interests align with yours.

Where to Go for More Information

There are a number of resources listed in text throughout the book. These resources will provide additional background, bring you up to speed on various technologies, and so forth. For your convenience, there is a bibliography online that contains all the links so that these resources are just a click away.

You can find the bibliography on MSDN at:

Next Topic | Previous Topic | Home

Last built: May 25, 2012