16
OData everywhere Matt Milner Pluralsight

OData everywhere Matt Milner Pluralsight. Overview What and why of OData OData client ecosystem

  • View
    237

  • Download
    3

Embed Size (px)

Citation preview

Page 1: OData everywhere Matt Milner Pluralsight. Overview What and why of OData OData client ecosystem

OData everywhere

Matt MilnerPluralsight

Page 2: OData everywhere Matt Milner Pluralsight. Overview What and why of OData OData client ecosystem

Overview

What and why of OData

OData client ecosystem

Page 3: OData everywhere Matt Milner Pluralsight. Overview What and why of OData OData client ecosystem

OData We need another data access

technology?

ODBCOLE DB

ADO RDO

ADO.NET

Linq to SQL EntityFramework

DataSetWhich of these is cross platform?

Page 4: OData everywhere Matt Milner Pluralsight. Overview What and why of OData OData client ecosystem

Open Data Protocol

Open: HTTP, ATOMPub, JSON

Data: Querying & updating

Protocol: Data format, uri constraints, metadata

Page 5: OData everywhere Matt Milner Pluralsight. Overview What and why of OData OData client ecosystem

ProtocolGET http://localhost/TaskService.svc/Tasks Accept: application/json

HTTP/1.1 200 OKDataServiceVersion: 1.0;Content-Length: 876Content-Type: application/json;charset=utf-8

{"d" : [ {"__metadata": {"uri": "http://localhost/TaskService.svc/Tasks(2)", "type": "TaskDBModel.Task"}, "TaskID": 2, "AssignedTo": "3", "DueDate": "\/Date(1298505600000)\/", "Description": "hire HR manager", "Priority": 1, "PercentComplete": 25 } ] }

Page 6: OData everywhere Matt Milner Pluralsight. Overview What and why of OData OData client ecosystem

POST http://localhost/TaskService.svc/Tasks HTTP/1.1Content-Type: application/jsonAccept: application/jsonContent-Length: 153

{"Description":“Fire Sally","Priority":1,"PercentComplete":25, "DueDate":"\/Date(1298505600000)\/","AssignedTo":"3"}

Protocol

HTTP/1.1 201 CreatedDataServiceVersion: 1.0;Content-Length: 297Location: http://localhost/TaskService.svc/Tasks(5)Content-Type: application/json;charset=utf-8{"d" : {"__metadata": {"uri": "http://localhost/TaskService.svc/Tasks(5)", "type": "TaskDBModel.Task"}, "TaskID": 5, "AssignedTo": "3", "DueDate": "\/Date(1298505600000)\/", "Description": “Fire Sally", "Priority": 1, "PercentComplete": 25}}

Page 7: OData everywhere Matt Milner Pluralsight. Overview What and why of OData OData client ecosystem

System query optionsOption Description Example

$filter Filters the result set /Movies?$filter=Title eq ‘Star Wars’

$orderby Sort the target resources /Movies?$orderby=Title desc

$top Return only the top n resources /Movies?$top=10/Movies?$orderby=Title&$top=5

$skip Skip the first n resources /Movies?$skip=100&$top=10

$select Create a projection /Movies(1)/’Reviews?$select=rating,reviewer

$inlinecount Includes the total count /Movies?$top=100&$inlinecount=allpages

$value Retrieve a value without any surrounding metadata

/Movies(2)/Title/$value

$expand Eager loading of specified elements

/Movies(1)?$expand=Reviews

Page 8: OData everywhere Matt Milner Pluralsight. Overview What and why of OData OData client ecosystem

OData producers

Producers

• SharePoint 2010• SQL Azure• Azure Table Storage• IBM WebSphere• Data Market• . . .

Services

• Ebay• Facebook• Netflix• Pluralsight

Page 9: OData everywhere Matt Milner Pluralsight. Overview What and why of OData OData client ecosystem

OData clients

Windows

.NET

Silverlight

PowerPivot

Browsers

Atom

JavaScript

jQuery

Open Source

PHP

Ruby

Java

Mobile

Win Phone 7

IPhone / IPad (objective C)

Android

Page 10: OData everywhere Matt Milner Pluralsight. Overview What and why of OData OData client ecosystem

Windows / .NET Add Service

Reference Managed data

context Full batching

support Databinding

Page 11: OData everywhere Matt Milner Pluralsight. Overview What and why of OData OData client ecosystem

Silverlight DataServiceCollection –

async load Out of browser support Browser or custom

credentials (OOB)

Page 12: OData everywhere Matt Milner Pluralsight. Overview What and why of OData OData client ecosystem

PowerPivot Analytics Charting Relationships

Page 13: OData everywhere Matt Milner Pluralsight. Overview What and why of OData OData client ecosystem

Browsers JSON / ATOM JavaScript

library

Page 14: OData everywhere Matt Milner Pluralsight. Overview What and why of OData OData client ecosystem

Open source Ruby = gem install

ruby_odata Java = RestLet extension PHP = PHPDataSvcUtil

Page 15: OData everywhere Matt Milner Pluralsight. Overview What and why of OData OData client ecosystem

Phones Native libraries for Mac

and WP7 Restlet / java support on

Android

Page 16: OData everywhere Matt Milner Pluralsight. Overview What and why of OData OData client ecosystem

© 2011 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.