Your SlideShare is downloading. ×
0
Connecting to Data from
Windows Phone 8
Chris Woodruff
Director, Perficient
Level: Intermediate to Advanced
Who I am?
Chris Woodruff
MVP, Visual C#
Director at Perficient
Co-host of Deep Fried Bytes Podcast
@cwoodruff / cwoodruff@...
You will learn:
• Understand the benefits of using REST web services for
your mobile apps
• Have an understanding to devel...
LETS TAKE A REST
• REST is an architectural style for distributed
hypermedia systems
• REpresentational State Transfer
• The term originate...
What does REST consist of?
REST is a very simple architecture:
• Application state and functionality is divided into
resou...
What does REST consist of?
Characteristics of REST
• Client–server
• Stateless
• Cacheable
• Uniform Interface
• Named Res...
Example of REST
Query a Resource
http://www.parts-depot.com/parts/getPart?id=00345
http://www.parts-depot.com/parts/00345
...
DIGGING INTO ODATA
Open Data Protocol (OData)
• “RESTful” Web protocol
• Designed to work with data across HTTP
• Built on existing Web stand...
The Basics
• Feeds, which are Collections of typed Entries
• OData services can expose Service Operations
• OData services...
Full SQL like Query “Language”
HTTP Command
(Verb)
SQL
Command
GET SELECT
PUT UPDATE
POST INSERT
DELETE DELETE
http://services.odata.org/OData/OData.svc
_______________________________________/
|
service root URI
http://services.odat...
OData Best Practices (Producer)
• Always design your OData feed will server-side paging if
your entity collections hold la...
Why are we excited!!
ODATA AND HOW TO
CONSUME IT IN WINDOWS
PHONE
DEMO
Windows Phone and OData
OData Best Practices (Consumer)
• Use Query Projection to only bring back the entity
properties you or your app needs.
• T...
AZURE MOBILE SERVICES
AND HOW TO CONSUME IT
IN WINDOWS PHONE
DEMO
Windows Phone and Azure Windows Services
The demo projects can be found at:
github.com/cwoodruff/
Resources
REST
http://www.ics.uci.edu/~taylor/documents/2002-REST-
TOIT.pdf
OData
http://odata.org
http://odataprimer.com
...
Contact Me
Chris “Woody” Woodruff
cwoodruff@live.com
Twitter @cwoodruff
Skype cwoodruff
http://chriswoodruff.com
http://de...
Upcoming SlideShare
Loading in...5
×

Connecting to Data from Windows Phone 8 VSLive! Redmond 2013

339

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
339
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Representational State Transfer (REST) is defined as an architectural style, which means that it is not a concrete systems architecture, but instead a set of constraints that are applied when designing a systems architecture. We briefly discuss these constraints, but then focus on explaining how the Web is one such systems architecture that implements REST. In particular, the mechanisms of the Uniform Resource Identifiers (URIs), the Hypertext Transfer Protocol (HTTP), media types, and markup languages such as the Hypertext Markup Language (HTML) and the Extensible Markup Language (XML). We also introduce Atom and the Atom Publishing Protocol (AtomPub) as two established ways on how RESTful services are already provided and used on today's Web.
  • Client-Server: a pull-based interaction style: consuming components pull representations.Stateless: each request from client to server must contain all the information necessary to understand the request, and cannot take advantage of any stored context on the server.Cache: to improve network efficiency responses must be capable of being labeled as cacheable or non-cacheable.Uniform interface: all resources are accessed with a generic interface (e.g., HTTP GET, POST, PUT, DELETE).Named resources - the system is comprised of resources which are named using a URL.Interconnected resource representations - the representations of the resources are interconnected using URLs, thereby enabling a client to progress from one state to another.Layered components - intermediaries, such as proxy servers, cache servers, gateways, etc, can be inserted between clients and resources to support performance, security, etc.
  • Transcript of "Connecting to Data from Windows Phone 8 VSLive! Redmond 2013"

    1. 1. Connecting to Data from Windows Phone 8 Chris Woodruff Director, Perficient Level: Intermediate to Advanced
    2. 2. Who I am? Chris Woodruff MVP, Visual C# Director at Perficient Co-host of Deep Fried Bytes Podcast @cwoodruff / cwoodruff@live.com / Skype: cwoodruff
    3. 3. 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.
    4. 4. LETS TAKE A REST
    5. 5. • REST is an architectural style for distributed hypermedia systems • REpresentational State Transfer • The term originated in 2000 by Roy Fielding for his PhD thesis • 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?
    6. 6. What does REST consist of? REST is a very simple architecture: • Application state and functionality is divided into resources. • 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
    7. 7. What does REST consist of? Characteristics of REST • Client–server • Stateless • Cacheable • Uniform Interface • Named Resources • Interconnected Resource Representations • Layered System Operations of REST • GET • POST • PUT • DELETE
    8. 8. Example of REST Query a Resource http://www.parts-depot.com/parts/getPart?id=00345 http://www.parts-depot.com/parts/00345 http://restbucks.com/PlaceOrder?coffee={type}&size={size}&milk= {milk}&location={location}
    9. 9. DIGGING INTO ODATA
    10. 10. 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 consumer • Uses self-describing metadata • Has multiple options to build implementation based on standard protocol • Soon to be a full web standard
    11. 11. The Basics • Feeds, which are Collections of typed Entries • OData services can expose Service Operations • OData services expose all these constructs via URIs • OData service may also expose a Service Metadata Document
    12. 12. Full SQL like Query “Language” HTTP Command (Verb) SQL Command GET SELECT PUT UPDATE POST INSERT DELETE DELETE
    13. 13. http://services.odata.org/OData/OData.svc _______________________________________/ | service root URI http://services.odata.org/OData/OData.svc/Category(1)/Products?$top=2&$orderby=name _______________________________________/ __________________/ _________________/ | | | service root URI resource path query options What is an OData URI loo like?
    14. 14. 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
    15. 15. Why are we excited!!
    16. 16. ODATA AND HOW TO CONSUME IT IN WINDOWS PHONE
    17. 17. DEMO Windows Phone and OData
    18. 18. 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- side paging. • Design and implement a client-side data caching function in your app (unless sensitive data).
    19. 19. AZURE MOBILE SERVICES AND HOW TO CONSUME IT IN WINDOWS PHONE
    20. 20. DEMO Windows Phone and Azure Windows Services
    21. 21. The demo projects can be found at: github.com/cwoodruff/
    22. 22. Resources REST http://www.ics.uci.edu/~taylor/documents/2002-REST- TOIT.pdf OData http://odata.org http://odataprimer.com Azure Mobile Services http://www.windowsazure.com/en-us/develop/mobile/
    23. 23. Contact Me Chris “Woody” Woodruff cwoodruff@live.com Twitter @cwoodruff Skype cwoodruff http://chriswoodruff.com http://deepfriedbytes.com
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×