odata introduction and impact on api design (webcast)
DESCRIPTION
We're in a data-driven economy. Web API designers need to define what and how to expose data from a variety of apps, services, and stores. What are challenges of unlocking data and opening up access in a straightforward and standards-compliant manner? Is OData the right tool for the job? Join Anant, Brian, and Greg for a discussion of OData, its API design implications, and the pros and cons of OData as an enabler of data integration and interoperability across Data APIs. We Will Discuss » - OData, SQL, and the "RESTification" of data - providing a uniform way to expose, structure, query and manipulate data using REST principles. - Opportunity and challenges for OData. - The questions of Web standards and proprietary versus open tools and protocols.TRANSCRIPT
![Page 1: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/1.jpg)
OData and Impact on API Design
With
Brian Pagano
@brianpagano
Greg Brail
@gbrail
Anant Jhingran
@jhingran
![Page 2: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/2.jpg)
groups.google.com/group/api-craft
![Page 3: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/3.jpg)
youtube.com/apigee
![Page 4: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/4.jpg)
slideshare.net/apigee
![Page 5: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/5.jpg)
Introductions OData Primer API Design The OData Community Conclusions
![Page 6: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/6.jpg)
@gbrail@brianpagano@jhingran
![Page 7: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/7.jpg)
Interactions are shifting to edge of enterprise
Business
Networks
Social
Networks
Apps
Your
Company
Your
Web Site
Your Store
Your apps
Your Data
APIs
What the means is that
you’ve think about “data” –
what you expose, and what
you collect “differently”
- API-centric
![Page 8: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/8.jpg)
Exposing data attracts business to the core even if data is not your core business
http://blog.apigee.com/detail/api_strategy_talk_web_2.0/
See Amundsen’s Dogs, Information Halos and APIs: The epic story of your API Strategy »
![Page 9: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/9.jpg)
Exposing Data is more than the “R” of CRUD in REST
M(E/A)SS OF
INTERCONNECTED DATA
GOOD CLEAN API’S
How do you go from the m(e/a)ss to clean APIs?
![Page 10: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/10.jpg)
Two schools of thought
Table1 Table2
1 N
REST APIS
“Schema-ed” Relational or
Relational-like view of “data”
REST APIS
“Linked Data” view – individual
objects, with properties and
interconnections
![Page 11: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/11.jpg)
Today we’ll discuss the “Schema-ed” view of the world, and in particular, the OData approach
1 N
REST APIS
![Page 12: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/12.jpg)
Let’s look at OData requests and responses.
![Page 13: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/13.jpg)
SQL Query OData Request
select * from products where id = 1 /Products(1)
select * from productswhere name = ‘Milk’
/Products?$filter=name eq ‘Milk’
select name from products /Products?$select=name
select * from products order by name /Products?$orderby=name
select * from products offset 10 limit 10 /Products?$top=10&$skip=10
select * from prices r, products p where r.id = p.id
/Products(1)?$expand=Prices
OData by Example
(* sort of)
![Page 14: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/14.jpg)
/Categories?$filter=Name eq ‘Dairy’
Filters
Logical Operators
eq ne gt ge lt le eq or and
Arithmetic Operators
add sub mul div mod
Parenthesis Operator
()
Canonical Functions
substrof endswith startswith
length indexof replace substring tolower
toupper trim concat year years month day
days hour hours minute minutes second
seconds round floor ceiling isof cast
![Page 15: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/15.jpg)
atom json xml
(plus any other IANA-defined media types)
*If the $format query option is present in a request URI it takes precedence over the value(s) specified in the Accept request header.
Format
/Categories?$format=json *
![Page 16: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/16.jpg)
Metadata
<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
<edmx:DataServices
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
m:DataServiceVersion="1.0">
<Schema Namespace="NorthwindModel"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns="http://schemas.microsoft.com/ado/2008/09/edm">
<EntityType Name="Category">
<Key>
<PropertyRef Name="CategoryID" />
</Key>
<Property Name="CategoryID" Type="Edm.Int32" Nullable="false"
p8:StoreGeneratedPattern="Identity"
xmlns:p8="http://schemas.microsoft.com/ado/2009/02/edm/annotation" />
<Property Name="CategoryName" Type="Edm.String" Nullable="false"
MaxLength="15" Unicode="true" FixedLength="false" />
<Property Name="Description" Type="Edm.String" Nullable="true" MaxLength="Max"
Unicode="true" FixedLength="false" />
</EntityType>
</Schema>
</edmx:DataServices>
</edmx:Edmx>
![Page 17: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/17.jpg)
Libraries
![Page 18: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/18.jpg)
from http://www.odata.org/libraries
![Page 19: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/19.jpg)
WTF is WCF?
![Page 20: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/20.jpg)
Who is using OData?
![Page 21: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/21.jpg)
![Page 22: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/22.jpg)
Who created OData?
![Page 23: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/23.jpg)
![Page 24: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/24.jpg)
How does OData compare to other approaches?
![Page 25: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/25.jpg)
Odata Request Web API Style
/Products(1) /Products/1
/Products?$filter=name eq ‘Milk’ /Products?name=Milk
/Products/1?$select=name /Products/1/name
/Products?$orderby=name /Products?orderby=name
/Products?$top=10&$skip=10 /Products?offset=10&limit=10
/Products(1)?$expand=Prices /Products/1?expand=Prices
OData or Not?
![Page 26: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/26.jpg)
OData GData SOAP Observed API Patterns on the Web
![Page 27: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/27.jpg)
How active is community support for OData?
![Page 28: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/28.jpg)
Is it time to rally around a standard like OData?
Or is too early?
![Page 29: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/29.jpg)
Should one implement OData?
![Page 30: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/30.jpg)
Questions
![Page 31: OData Introduction and Impact on API Design (Webcast)](https://reader034.vdocuments.us/reader034/viewer/2022052412/5594549e1a28ab98118b45a5/html5/thumbnails/31.jpg)
THANK YOU
Greg Brail
@gbrail
Anant Jhingran
@jhingran
Brian Pagano
@brianpagano
Questions and ideas to:
groups.google.com/group/api-craft