OData for iOS developers
Upcoming SlideShare
Loading in...5
×
 

OData for iOS developers

on

  • 5,259 views

An overview of OData delivered at the Atlanta iOS meetup 3/15/2011

An overview of OData delivered at the Atlanta iOS meetup 3/15/2011

Statistics

Views

Total Views
5,259
Views on SlideShare
4,802
Embed Views
457

Actions

Likes
7
Downloads
77
Comments
0

3 Embeds 457

http://blogs.msdn.com 454
http://www.7388.info 2
http://7388.info 1

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.
  • JSON (an acronym for JavaScript Object Notation) is a lightweight text-based open standard designed for human-readable data interchange. It is derived from the JavaScript programming language for representing simple data structures and associative arrays, called objects. Despite its relationship to JavaScript, it is language-independent, with parsers available for virtually every programming language.

OData for iOS developers OData for iOS developers Presentation Transcript

  • OData: A primer for iOS developers
    Glen Gordon
    Developer Evangelist
    Microsoft Corporation
    http://glengordon.name
    @glengordon
  • Who is this Microsoft guy?
    I support developer communities in GA, AL, MS
    I work with developers from all roles: enterprise, consultants, ISVs, students, startups, designers
    Lots of ways to interface with something Microsoft related
    .NET, PHP, JavaScript
    Silverlight, Windows Phone, iOS
    My goal is to make members of the community successful by introducing new technology or connecting people
  • Agenda
    The case for OData
    A look at the format
    Producers, services and consumers
    Resources and tips
  • why data services?
  • break data silos
  • == data sharing & integration
  • Requirements for Web Data Services
    Web friendly, just plain HTTP
    Uniform patterns
    Focus on data, not on formats
    Stay high level, abstract the store
  • data service != gateway to database
    service interface
    business logic
    store
  • odata in 1 slide…
  • OData
    Uniform way of representing structured data
    Atom, JSON formats
    Uniform URI conventions
    Navigation, filtering, sorting, paging, etc.
    Uniform operations
    Addressability
    GET, POST, PUT, DELETE always mean the same
  • REST: 3 definitions
    An architectural style for building loosely coupled systems
    defined by a set of very general constraints (principles)
    the Web (URI/HTTP/HTML/XML) is an instance of this style
    The Web used correctly (i.e., not using the Web as transport)
    HTTP is built according to RESTful principles
    services are built on top of Web standards without misusing them
    most importantly, HTTP is an application protocol (not a transport protocol)
    Anything that uses HTTP and XML (XML without SOAP)
    XML-RPC was the first approach for this
    violates REST because there is no uniform interface
  • The name Atom applies to a pair of related standards. The Atom Syndication Format is an XML language used for web feeds, while the Atom Publishing Protocol (AtomPub) is a simple HTTP-based protocol for creating and updating web resources.
    ATOMPub
  • 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 a URI?
  • Full SQL like Query “Language”
  • Addressing entities and sets
  • Presentation options
  • Query Options
  • Filter Expressions
  • Filter Methods
  • Examples
    http://services.odata.org/OData.svc/GetProductsByRating?rating=5
    Identifies the "GetProductsByRating" Service Operation and specifies a value of 5 for the "rating" input parameter.
    Service Operations(Functions)
  • { "d" : {
    "results": [
    {
    "__metadata": {
    "uri": "http://services.odata.org/OData/OData.svc/Categories(0)",
    "type": "DataServiceProviderDemo.Category"
    },
    "ID": 0,
    "Name": "Food",
    "Products": {
    "__deferred": {
    "uri": "http://services.odata.org/OData/OData.svc/Categories(0)/Products"
    }
    }
    },
    { /* another Category Entry */ },
    { /* another Category Entry */ },
    { /* another Category Entry */ }
    ],
    "__count": "3",
    "__next": "http://services.odata.org/OData/OData.svc$skiptoken=12"
    } }
    JSON
  • Producers and Consumers
  • OData Producers
    Windows Communication Foundation (WCF)
    SharePoint 2010
    IBM WebSphere
    SQL Azure
    Windows Azure Table Storage
    SQL Server Reporting Services
    Microsoft Dynamics CRM 2011
    GeoREST
    Build your own
  • OData Services
    ebay
    Netflix
    Twitpic
    Windows Live
    NerdDinner
    Open Government Data Initiative
    Open Science Data Initiative
    Windows Azure Marketplace DataMarket
  • OData Consumers – End Users
    Web Browsers
    Excel 2010
    OData Explorer
  • OData Consumers – Client Libraries
    .NET
    Javascript
    PHP
    Java
    Windows Phone 7
    iOS (Objective C)
    Ruby
    Joomla
    Drupal
  • Servers
    • WCF Data Services
    • SharePoint 2010
    • SQL Server Reporting Services 2008 R2
    • SQL Azure
    • IBM WebSphereeXtremeScale
    • Microsoft Media Room
    • WCF RIA Services
    Services
    • Netflix
    • Mix 2010
    • Nerd Dinner
    • Vancouver’s vanGuide
    • Open Government Data Initiative
    • Open Science Data Initiative
    • Microsoft Codename “Dallas”
    • City of Edmonton
    http://odata.org/producers
    Clients
    • Excel + PowerPivot
    • LINQPad
    • OData Explorer
    Client libraries
    • .NET
    • Silverlight
    • Windows Phone 7 Series
    • Javascript
    • Java
    • Objective-C
    • PHP
    http://odata.org/consumers
  • OData and iOS
  • OData and iOS
    http requests
    Parse XML or JSON
    OR
    Use the OData Client for Objective-C
    http://odataobjc.codeplex.com/
  • demos
  • Resources
    All things OData: http://odata.org
    Email: glen.gordon@microsoft.com
    Blog: http://glengordon.name
    Data @ MSDN: http://msdn.com/data
  • © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
    The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.