Consuming the Data

The developers at Tailspin implemented a set of custom classes in the mobile client application to handle the data transfer with the Tailspin web service. The classes on the mobile client interact with the WCF REST service and parse the data received from the service. Tailspin’s analysis of the data transfer requirements for the Windows Phone 7 application identified only two types of interaction with the service: a “Get Surveys” operation and a “Send Survey Result” operation, so the implementation of custom client should be quite simple. Furthermore, the “Send Survey Result” operation always appends the result to the store on the server so there are no concurrency issues, and survey creators cannot modify a survey design after they publish it so there are no versioning issues.

Note: In the future, Tailspin may decide to use WCF Data Services and the OData protocol. OData client libraries, including a version for Windows Phone 7, are available for download on the Open Data Protocol website (http://www.odata.org/developers/odata-sdk). At the time of this writing, the version of the OData Client Library for Windows Phone 7 was a prerelease version. You should check to see whether a later release is available.

Using the OData Client Library would minimize the amount of code that the developers would have to write because the library and the code generated by using the DataSvcUtil utility fully encapsulate the calls to the WCF Data Service endpoint. Furthermore, using the client library offers advanced features such as batching, client-side state management, and conflict resolution.

For a walkthrough that shows how to use the OData Client Library on the Windows Phone 7 platform, see the post, “Developing a Windows Phone 7 Application that consumes OData,” on Phani Raj’s blog (http://blogs.msdn.com/b/phaniraj/).

Tailspin also evaluated the Microsoft Sync Framework to handle synchronizing data between the phone and Windows Azure, but the Microsoft Sync Framework 3.0 was also a pre-release version when they began their implementation.

 


Posted

in

by

Tags: