1 - The Tailspin Scenario
This chapter introduces a fictitious company named Tailspin. Tailspin's flagship product is an online service, named Surveys, that enables other companies or individuals to conduct their own online surveys. A year ago, Tailspin extended this service to mobile users, enabling subscribers to the Surveys application to publish surveys to people with Windows® Phone devices. These people used the Surveys mobile client application for Windows Phone OS 7.0 to capture survey data from the field, and it proved to be highly successful. Tailspin has now decided to develop a new version of the Surveys mobile client application that uses some of the new functionality available in Windows Phone OS 7.1, in order to improve the application experience. The chapters that follow show, step by step, how Tailspin designed and developed the Surveys mobile client application to run on Windows Phone devices that run Windows Phone OS 7.1.
The Tailspin Company
You Will Learn
- About the Tailspin company and its goals in developing the mobile client application.
- About the mobile client application architecture and components.
- About the mobile client application stakeholders.
Tailspin is a two-year-old ISV company of approximately 30 employees that specializes in developing solutions using Microsoft® technologies. The developers at Tailspin are knowledgeable about various Microsoft products and technologies, including the .NET Framework, Windows Azure™ technology platform, Silverlight® browser plug-in, Microsoft Visual Studio® development system, and Windows Phone OS 7.0. The Surveys mobile client application was the first application that the developers at Tailspin created for the Windows Phone platform. It increased both the volume of survey responses, and their customer base. Tailspin believes that the time is right to develop a new mobile client application that will use some of the new functionality available in Windows Phone OS 7.1. They hope their innovative approach to collecting survey data that the mobile client application offers will continue to help it to grow its market share and increase its revenues.
Tailspin is an innovative and agile organization; it is well placed to capitalize on new technologies, the business opportunities offered by the cloud, and the increasing sophistication of mobile phones. As an established company, Tailspin is willing to take risks and use new technologies when it implements applications.
Tailspin has gained a competitive advantage by being an early adopter of new technologies, especially in mobile devices and the cloud. It gained experience developing the Surveys mobile client application for Windows Phone OS 7.0, and will build on this experience when developing the Surveys mobile client application for Windows Phone OS 7.1.
Tailspin's Goals and Concerns
The Surveys application has been a great success for Tailspin, and their market position was further improved by developing the Surveys mobile client application for Windows Phone OS 7.0. Tailspin first developed the mobile client application because subscribers wanted to be able to proactively find survey respondents. Instead of waiting for respondents to come to the survey website by following a link on a web page or in an email, subscribers wanted other ways of finding survey respondents. For example, subscribers wanted to be able to use surveyors who could go out and interview people.
When Tailspin developed the Surveys mobile client application for Windows Phone OS 7.0 they identified three key features they felt the Surveys application should have:
- The application should support a wider range of question types and enable respondents to include additional data, such as pictures, audio, and location data, as a part of their survey responses.
- It should allow people to provide survey responses when they are away from their computers. A convenient time to respond to a survey might not be a convenient time to be using a computer, for example during a commute or while waiting in a checkout line.
- It should allow subscribers to capture a geographical location for the respondents answering a survey.
Tailspin wants to develop a new version of the Surveys mobile client application that uses some of the new functionality in Windows Phone OS 7.1.
The developers at Tailspin had a year’s experience with Windows Phone as a platform, and were confident of their abilities to build the Surveys mobile client application for Windows Phone OS 7.1. However, the developers first had to understand the capabilities of Windows Phone OS 7.1 in order to determine how best to architect and design both the mobile client application and the elements of the application in the cloud.
|The developers at Tailspin already have Windows Phone OS 7.0 development skills.|
There are many new features available in Windows Phone OS 7.1 including:
- Fast application switching
- Background agents
- Background file transfers
- New sensors
- Network information
- Enhanced push notification support
- Live tiles
- Local database support
- Sockets support
- Encrypted credentials store
- Programmatic camera access
The Tailspin developers had to decide which of the new features would add value to the mobile client application and offer a better user experience.
Three key areas of concern for Tailspin in using the Windows Phone platform were reliability, security, and connectivity.
Windows Phone devices may be only intermittently connected to the Internet, so the mobile client application had to be capable of reliably storing the collected data until it could be sent to the cloud application. Tailspin also wanted to make sure that passwords held on the Windows Phone device were stored securely.
For some surveys, subscribers wanted to be able to determine the identity of the person submitting the survey data to the cloud application.
Tailspin also wanted to implement a service endpoint in Windows Azure that best supports the requirements of Windows Phone devices. The developers at Tailspin had to make decisions about the connectivity between the mobile client application and the back end, such as whether to use Representational State Transfer (REST)-style or SOAP-style web services, how "chatty" the interface should be, and how to handle retries when sending a message failed.
Finally, Tailspin wanted to be able to leverage the existing skills of its developers and minimize any retraining necessary to develop the Surveys mobile client application for Windows Phone OS 7.1.
|A Windows Phone 7.5 device is a Windows Phone that is running Windows Phone OS 7.1.|
The Surveys Application Architecture
Figure 1 shows a high-level view of the architecture of the Surveys application.
Architectural view of the Tailspin Surveys application
There are two, top-level components in the Surveys application. The first is the back end that Tailspin hosts in Windows Azure and that enables subscribers to create, publish, and analyze surveys. This back end is described in the book, Developing Applications for the Cloud on the Microsoft Windows Azure Platform 2nd Edition, available on the MSDN® website. The second component, which is the focus of this guidance, is a mobile client application that runs on Windows Phone devices and that enables surveyors to collect survey response data and send it to the back end. This guidance also describes the changes to the back-end cloud application that were necessary to support the mobile client application.
Tailspin is developing the mobile client application to support new features in the Surveys service. These new features include the following:
- The ability for surveyors to filter available surveys on different criteria.
The mobile client application will allow surveyors to filter surveys based on the tenant, but Tailspin could extend this in the future to include filters on factors such as survey length, target audience, and location.
- The ability to collect rich data from survey respondents, such as the respondent's location, voice recordings, and pictures, as part of the survey.
- The ability of the application to notify surveyors that new surveys are available.
- The ability of the application to download new surveys from the cloud service and upload survey answers to the cloud service, in the background.
|Tailspin is taking advantage of features such as the camera and the GPS, which are part of the Windows Phone platform, to offer this functionality in the Surveys mobile client application.|
There are three actors in the scenario supported by the architecture: the ISV, the subscribers, and the surveyors.
Tailspin - The ISV
Tailspin has developed a multi-tenant, Software as a Service (SaaS) application named Surveys that it runs in the cloud. A range of subscribers—from individuals, through small companies, to large enterprises—uses the Surveys service to run custom surveys. Tailspin has also developed the mobile client application for Windows Phone devices running Windows Phone OS 7.1, described in this guidance, that it makes available to surveyors through the Windows Phone Marketplace.
Fabrikam and Adatum - The Subscribers
In the scenario, Fabrikam and Adatum are also fictitious companies who play the role of subscribers to the Surveys service. They design and launch surveys using the Surveys service, wait for responses, and then analyze the results that the Surveys application collects.
The Surveyors - Windows Phone Users
The surveyors, who typically work from home, subscribe to surveys based on a predefined criteria and are notified when new surveys are published. Using a Windows Phone device, they can either answer the survey questions themselves, or they can interview other people and use the device to capture the survey response data. For example, a surveyor could use the device to record traffic patterns at different times of the day or to go door-to-door collecting survey responses.
|By using surveyors, Tailspin has targeted surveys more effectively and improved the response rate. Tailspin aims to further improve the application experience with the Surveys mobile client application for Windows Phone OS 7.1.|
The Business Model
Tailspin's business model is to charge subscribers a monthly fee for access to the Surveys application, and Tailspin must then pay the actual costs of running the application. The Surveys mobile client application is free to surveyors, and surveyors who are collecting multiple responses to surveys can also be compensated. A Surveys subscriber such as Adatum, could either pay a surveyor for the number of submitted surveys or offer discount coupons. This works by identifying the surveyor who submitted the survey responses.
Tailspin is also planning to use the Microsoft Advertising SDK for Windows Phone to embed advertisements in the mobile client application as an additional way of generating revenue. The Advertising SDK is fully integrated into the Windows Phone 7.1 SDK and does not need to be installed separately.
The sample application that you can download to go with this guide doesn't implement any revenue-generating functionality; however, it is likely that a real-world version of the application would do this.
Tailspin will make the mobile client application available for free.
The Application Components
Figure 2 illustrates the key functional components of the mobile client application and the relationships between them.
Tailspin Surveys, end to end
Developing Applications for the Cloud on the Microsoft Windows Azure Platform2nd Edition describes the Tailspin back end and Subscriber website architecture, design, and implementation in detail. These components, which run on Windows Azure, enable subscribers to design new surveys and to analyze the responses that the application collects. The book also describes a public website that people can use to complete surveys using a web browser. The scenario described in this guidance focuses on an application running on Windows Phone OS 7.1 that provides an additional way for Tailspin to capture survey results.
|The Windows Phone mobile client application is an alternative to using the web as a mechanism for collecting survey responses.|
The Surveys application on Windows Phone comprises a number of components. A user interface (UI) enables the user to complete surveys and perform other tasks. A storage repository holds survey definitions and survey responses. A synchronization component is responsible for downloading survey definitions from the Tailspin back end and for uploading completed survey data.
To enable the Windows Phone application to communicate with the back end, the cloud components include an API that exposes the functionality that the mobile client application requires. Tailspin uses Windows Communication Foundation (WCF) REST to transport the data over the network. The Windows Phone application also authenticates with the back end so that the back end can determine which surveys it should make available to the mobile client and can track which responses come from which user. In the scenario described in this guidance, the mobile client application authenticates with the back end using basic authentication, but it is designed in such a way that it could be extended to accept more sophisticated mechanisms, such as a claims-based approach.
The application uses push notifications to inform the mobile client application that there are new surveys available to download. These push notifications will reach the Windows Phone device even when the Surveys mobile client application is not running.
Later chapters in this guidance describe these components in more detail.
All links in this book are accessible from the book's online bibliography. You can find the bibliography on MSDN at: http://msdn.microsoft.com/en-us/library/gg490786.aspx.
Last built: May 25, 2012