• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Connecting to Data from Windows Phone 8
 

Connecting to Data from Windows Phone 8

on

  • 625 views

You know you have to have a great experience when you develop your Windows Phone 8 applications right? The greatest experience you can give your users is around their data. There are ways to improve ...

You know you have to have a great experience when you develop your Windows Phone 8 applications right? The greatest experience you can give your users is around their data. There are ways to improve your Windows Phone 8 application and Chris Woodruff will teach you how to get data quickly, save it with validation, save it locally and many, many more tricks. Come see why you should know the tricks of the trade before developing that killer Windows Phone 8 app. You will be a Data Experience expert when you leave the room after this session.

Statistics

Views

Total Views
625
Views on SlideShare
531
Embed Views
94

Actions

Likes
0
Downloads
0
Comments
0

1 Embed 94

https://twitter.com 94

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • 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.

Connecting to Data from Windows Phone 8 Connecting to Data from Windows Phone 8 Presentation Transcript

  • Connecting to Data fromWindows Phone 8Chris WoodruffSenior TrainerTelerikLevel: Intermediate to Advanced
  • Who I am?Chris WoodruffMVP, Visual C#Trainer at TelerikCo-host of Deep Fried Bytes Podcast@cwoodruff / cwoodruff@live.com /Skype: cwoodruff
  • You will learn:• Understand the benefits of using REST webservices for your mobile apps• Be able to use develop solutions againstOData that will give better experiences foryour users• How to shape your data queries to give thebest performance for your mobile apps• A glimpse into using Windows Azure MobileServices to also get to your data in the cloud.
  • LETS TAKE A REST
  • • REST is an architectural style fordistributed hypermedia systems• REpresentational State Transfer• The term originated in 2000 by RoyFielding for his PhD thesis• REST states that the existing protocolsand principles of the web are enough tocreate robust Web Services – no SOAPis neededWhat is REST?
  • What does REST consist of?REST is a very simple architecture:• Application state and functionality isdivided into resources.• Every resource is uniquely addressableusing a universal syntax for hypermedialinks• All resources share a uniform interface forthe transfer of state between a client and aresource
  • What does REST consist of?Characteristics of REST• Client–server• Stateless• Cacheable• Uniform Interface• Named Resources• InterconnectedResourceRepresentations• Layered SystemOperations of REST• GET• POST• PUT• DELETE
  • Example of RESTQuery a Resourcehttp://www.parts-depot.com/parts/getPart?id=00345http://www.parts-depot.com/parts/00345http://restbucks.com/PlaceOrder?coffee={type}&size={size}&milk={milk}&location={location}
  • 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 datapayloads to consumer• Uses self-describing metadata• Has multiple options to buildimplementation based on standardprotocol• Soon to be a full web standard
  • The Basics• Feeds, which are Collections oftyped Entries• OData services can exposeService Operations• OData services expose all theseconstructs via URIs• OData service may also expose aService Metadata Document
  • Full SQL like Query “Language”HTTP Command(Verb)SQLCommandGET SELECTPUT UPDATEPOST INSERTDELETE DELETE
  • http://services.odata.org/OData/OData.svc_______________________________________/|service root URIhttp://services.odata.org/OData/OData.svc/Category(1)/Products?$top=2&$orderby=name_______________________________________/ __________________/_________________/| | |service root URI resource path query optionsWhat is a URI?
  • OData Best Practices (Producer)• Always design your OData feed willserver-side paging if your entitycollections hold large amounts of data.• Looks at server-side validation of queriesand data updates based on the usercredentials sent through HTTP
  • Why are we excited!!
  • ODATA AND HOW TOCONSUME IT IN WINDOWSPHONE
  • DEMOWindows Phone and OData
  • OData Best Practices (Consumer)• Use Query Projection to only bring backthe entity properties you or your appneeds.• Think about client-side paging even if theirexists server-side paging.• Design and implement a client-side datacaching function in your app (unlesssensitive data).
  • AZURE MOBILE SERVICESAND HOW TO CONSUME ITIN WINDOWS PHONE
  • DEMOWindows Phone and Azure Windows Services
  • The demo projects can be found at:github.com/cwoodruff/
  • ResourcesRESThttp://www.ics.uci.edu/~taylor/documents/2002-REST-TOIT.pdfODatahttp://odata.orghttp://odataprimer.comAzure Mobile Serviceshttp://www.windowsazure.com/en-us/develop/mobile/
  • Contact MeChris “Woody” Woodruffcwoodruff@live.comTwitter @cwoodruffSkype cwoodruffhttp://chriswoodruff.comhttp://deepfriedbytes.com