Successfully reported this slideshow.
Connecting to Data from
Windows Phone 8
Level: Intermediate to Advanced
Who I am?
MVP, Visual C#
Director at Perficient
Co-host of Deep Fried Bytes Podcast
@cwoodruff / email@example.com / Skype: cwoodruff
You will learn:
• Understand the benefits of using REST web services for
your mobile apps
• Have an understanding to develop solutions against
OData that will give better experiences for your users
• How to shape your data queries to give the best
performance for your mobile apps
• A glimpse into using Windows Azure Mobile Services to
also get to your data in the cloud.
LETS TAKE A REST
• REST is an architectural style for distributed
• REpresentational State Transfer
• The term originated in 2000 by Roy Fielding for his
• REST states that the existing protocols and principles
of the web are enough to create robust Web Services
– no SOAP is needed
What is REST?
What does REST consist of?
REST is a very simple architecture:
• Application state and functionality is divided into
• Every resource is uniquely addressable using a universal
syntax for hypermedia links
• All resources share a uniform interface for the transfer of
state between a client and a resource
What does REST consist of?
Characteristics of REST
• Uniform Interface
• Named Resources
• Interconnected Resource
• Layered System
Operations of REST
Example of REST
Query a Resource
DIGGING INTO ODATA
Open Data Protocol (OData)
• “RESTful” Web protocol
• Designed to work with data across HTTP
• Built on existing Web standards
• Uses popular formats to return data payloads to
• Uses self-describing metadata
• Has multiple options to build implementation based on
• Soon to be a full web standard
• Feeds, which are Collections of typed Entries
• OData services can expose Service Operations
• OData services expose all these constructs via
• OData service may also expose a Service
Full SQL like Query “Language”
service root URI
_______________________________________/ __________________/ _________________/
| | |
service root URI resource path query options
What is an OData URI loo like?
OData Best Practices (Producer)
• Always design your OData feed will server-side paging if
your entity collections hold large amounts of data.
• Looks at server-side validation of queries and data
updates based on the user credentials sent through HTTP
Why are we excited!!
ODATA AND HOW TO
CONSUME IT IN WINDOWS
Windows Phone and OData
OData Best Practices (Consumer)
• Use Query Projection to only bring back the entity
properties you or your app needs.
• Think about client-side paging even if their exists server-
• Design and implement a client-side data caching function
in your app (unless sensitive data).
AZURE MOBILE SERVICES
AND HOW TO CONSUME IT
IN WINDOWS PHONE
Windows Phone and Azure Windows Services
The demo projects can be found at:
Azure Mobile Services
Chris “Woody” Woodruff