SlideShare a Scribd company logo
Building RESTful Applications  with the Open Data Protocol Todd Anglin Chief Evangelist, Telerik Level:  Intermediate
Introductions Todd Anglin Chief Evangelist, Telerik Microsoft MVP ASP Insider President NHDNUG & O’Reilly Author @toddanglin TelerikWatch.com
The Plan
What you should learn today: What is  REST/OData Who created  REST/OData Why use  REST/OData When should you use  REST/OData Where can you find  REST/OData
How did we get here?
“ There is a  vast amount of data  available today and data is now being collected and stored at a rate never seen before. Much, if not most, of this data however is  locked  into specific applications or formats and  difficult to access  or to  integrate  into new uses.”  - OData.org
State of Data & Services Internal  SQL My App App Data CMS Share Point Cloud Custom API SQL JSON Services FB
What is REST? Re presentational  S tate  T ransfer What is the biggest REST implementation? World Wide Web! REST is NOT a standard! (But it uses standards) HTTP + URLs + XML*
REST Principles
REST Illustrated Magic Kingdom (Resource) http://disneyworld.com/parks/magic-kingdom Resource URL Representation URL Click (State Transfer) Representation
RESTful Services Core idea: let's have  computers  use the web the way  humans  do
Alternatives to REST Most common: SOAP and RPC Why use SOAP (vs REST)? Enterprise security features (WS-Security) ACID Transactions (WS-AtomicTransaction) Message error recovery (WS-ReliableMessaging) SOAP  services focus on exposing  application logic REST  services focus on exposing  “data”  (or CRUD operations on data)
OData does for  data  what REST does for  services
(Finally!) What is OData? HTTP REST-based services AtomPub Data structure JSON  Data delivery format Data silo buster
What do web services require? A way to discover a service provider A way to discover available services at a provider A way to describe how to interface with service A way to execute functions provided by a service A standard messaging format A way to represent the data in exchange
Why? Interoperability Predictable access to data from any system Gaining popularity SharePoint 2010 SQL Server 2008 R2 IBM WebSphere eXtreme Scale Azure Table Storage Telerik TeamPulse …
REST AND ODATA IN ACTION DEMO
Consuming OData Windows Phone 7 / iPhone / Mobile AJAX / Javascript  PHP / Java / .NET  Silverlight  PowerPivot  Simple HTTP Requests (GET, POST, PUT, DELETE) More…
Visual Studio Tools Open Data Protocol Visualizer
CONSUMING EXISTING ODATA DEMO
Creating OData Service As simple as returning proper XML/JSON No specific platform requirements Ways to build: Using Visual Studio tools (WCF Data Services) SharePoint Lists Azure Table Storage Manually produce XML
WCF Data Services (Astoria) Build RESTful services on Microsoft platform Roots of OData protocol Built on WCF Supports ATOM (XML) and JSON data representations Automates REST for data Anything that implements IQueryable<T> or IUpdatable<T> EX:  EF, LinqToSQL, 3 rd  party ORM, etc.
WCF DATA SERVICES BASICS DEMO
Service Operations Functions exposed by OData Similar to RPC Accept zero or more primitive type input params Can return scalar value [WebGet]  is used for an addressable query [WebInvoke]  is used for insert, update, and delete http://.../OData.svc/ GetProductsByRating ?rating=5
Interceptors Query Interceptors Logic runs when resource is requested Uses:  limit the data viewed, log, perform security check Change Interceptors Logic runs when a change (Add/Edit/Delete) request is made (HTTP PUT/POST/DELETE)
SERVICE OPS & INTERCEPTORS DEMO
Securing Data Services Remember! REST is NOT a protocol, it’s a pattern Same security that applies to HTTP, AtomPub, JSON Other options: EntitySetRights Hiding sensitive data with [IgnoreProperties] Infrastructure security – SSL, IP Filtering QueryInterceptors
OData & SharePoint 2010 ListData.svc Out-of-the-box OData access to SharePoint data Data is NOT anonymously available! http://siteurl /_vti_bin/listdata.svc /Announcements
When to REST? Stateless web services Scalable web services (via HTTP caching) Mutually understood context (OData) Restricted bandwidth (Mobile) Always, except when there is a reason NOT to REST
[Q & A] Thanks! Gracias! Mersi! Blagodarya! @toddanglin telerikwatch.com [email_address]

More Related Content

PDF
Apache Olingo - ApacheCon Denver 2014
PPTX
PDF
A Look at OData
PDF
OData, Open Data Protocol. A brief introduction
PPTX
OData and SharePoint
PPTX
JAX-RS 2.0 and OData
ODP
Introduction to OData
PPTX
OData: A Standard API for Data Access
Apache Olingo - ApacheCon Denver 2014
A Look at OData
OData, Open Data Protocol. A brief introduction
OData and SharePoint
JAX-RS 2.0 and OData
Introduction to OData
OData: A Standard API for Data Access

What's hot (20)

PPTX
Open Data Protocol (OData)
PPTX
OData Introduction and Impact on API Design (Webcast)
PPTX
OData Services
PPTX
Practical OData
PPTX
Odata - Open Data Protocol
PPTX
Modern REST APIs for Enterprise Databases - OData
PPTX
OData for iOS developers
PPTX
Gaining the Knowledge of the Open Data Protocol (OData) - Prairie Dev Con
PPTX
OData, External objects & Lightning Connect
PPTX
Unerstanding and Using RESTful APIs
PPTX
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
PPT
Deploying RDF Linked Data via Virtuoso Universal Server
PPTX
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
PDF
Representational State Transfer (REST)
PPTX
Learning How to Shape and Configure an OData Service for High Performing Web ...
PDF
REST - Representational State Transfer
PPTX
RESTFul Web API Services @ DotNetToscana
PPTX
JSON and REST
PPT
Solving Real Problems Using Linked Data
Open Data Protocol (OData)
OData Introduction and Impact on API Design (Webcast)
OData Services
Practical OData
Odata - Open Data Protocol
Modern REST APIs for Enterprise Databases - OData
OData for iOS developers
Gaining the Knowledge of the Open Data Protocol (OData) - Prairie Dev Con
OData, External objects & Lightning Connect
Unerstanding and Using RESTful APIs
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
Deploying RDF Linked Data via Virtuoso Universal Server
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
Representational State Transfer (REST)
Learning How to Shape and Configure an OData Service for High Performing Web ...
REST - Representational State Transfer
RESTFul Web API Services @ DotNetToscana
JSON and REST
Solving Real Problems Using Linked Data
Ad

Viewers also liked (18)

PPTX
Edge of the Web
PPTX
Making HTML5 Work Everywhere
PPTX
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
PPT
HTML5 Mullet: Forms & Input Validation
PDF
Using HTML5 to Build Mobile Apps
PPSX
Rest api standards and best practices
PPTX
HTML5 Bootcamp: Essential HTML, CSS, & JavaScript
PDF
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
PPTX
Introduction to SAP Gateway and OData
PDF
Los Angeles Lakers tops, Miami Heat and Chicago Bulls follow as the most soci...
PPTX
10 Lessons Graphic Designers Can Learn From Sports Celebrities
PDF
Games Sense to Coaching Basketball
PDF
A World of Talent: What Perennial NBA Contenders Teach Us About Collaboration
PPTX
GraphTalks Rome - Selecting the right Technology
PDF
Webinar: RDBMS to Graphs
PPTX
Apple Inc Presentatioin
 
PPTX
Design Beautiful REST + JSON APIs
PDF
Mobile-First SEO - The Marketers Edition #3XEDigital
Edge of the Web
Making HTML5 Work Everywhere
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
HTML5 Mullet: Forms & Input Validation
Using HTML5 to Build Mobile Apps
Rest api standards and best practices
HTML5 Bootcamp: Essential HTML, CSS, & JavaScript
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
Introduction to SAP Gateway and OData
Los Angeles Lakers tops, Miami Heat and Chicago Bulls follow as the most soci...
10 Lessons Graphic Designers Can Learn From Sports Celebrities
Games Sense to Coaching Basketball
A World of Talent: What Perennial NBA Contenders Teach Us About Collaboration
GraphTalks Rome - Selecting the right Technology
Webinar: RDBMS to Graphs
Apple Inc Presentatioin
 
Design Beautiful REST + JSON APIs
Mobile-First SEO - The Marketers Edition #3XEDigital
Ad

Similar to Building RESTful Applications with OData (20)

PPTX
WCF Data Services - Bandung Charity Event - 2010
PPTX
Connecting to Data from Windows Phone 8
PPTX
Connecting to Data from Windows Phone 8 VSLive! Redmond 2013
PPTX
Connecting to Data from Windows Phone 8
PPTX
Gaining the Knowledge of the Open Data Protocol (OData)
PPTX
Gaining the Knowledge of the Open Data Protocol (OData)
PPTX
Building nTier Applications with Entity Framework Services (Part 2)
PPTX
Building nTier Applications with Entity Framework Services (Part 2)
PPTX
OData – Super Cola W3
PPTX
Building Software Backend (Web API)
PPTX
DPR202 Open Data for the Open Web
PPTX
Social Photos - My presentation at Microsoft Tech Day
PPTX
Using OData to build great customer experiences on any device by Lance Olson
PPTX
Building RESTfull Data Services with WebAPI
PPTX
Producing an OData feed in 10 minutes
PDF
WCF Data Services - Office Business Application &amp; iPhone
PPTX
Consuming Data From Many Platforms: The Benefits of OData - St. Louis Day of ...
PPTX
W8/WP8 App Dev for SAP, Part 2: Microsoft OData Application Development
PDF
RefCard API Architecture Strategy
PPTX
Introduction to o data
WCF Data Services - Bandung Charity Event - 2010
Connecting to Data from Windows Phone 8
Connecting to Data from Windows Phone 8 VSLive! Redmond 2013
Connecting to Data from Windows Phone 8
Gaining the Knowledge of the Open Data Protocol (OData)
Gaining the Knowledge of the Open Data Protocol (OData)
Building nTier Applications with Entity Framework Services (Part 2)
Building nTier Applications with Entity Framework Services (Part 2)
OData – Super Cola W3
Building Software Backend (Web API)
DPR202 Open Data for the Open Web
Social Photos - My presentation at Microsoft Tech Day
Using OData to build great customer experiences on any device by Lance Olson
Building RESTfull Data Services with WebAPI
Producing an OData feed in 10 minutes
WCF Data Services - Office Business Application &amp; iPhone
Consuming Data From Many Platforms: The Benefits of OData - St. Louis Day of ...
W8/WP8 App Dev for SAP, Part 2: Microsoft OData Application Development
RefCard API Architecture Strategy
Introduction to o data

More from Todd Anglin (10)

PPTX
Developing a Modern Mobile App Strategy
PPTX
5 Tips for Better JavaScript
PPTX
50in50: Resources for HTML5, CSS3, & JavaScript Developers
PPTX
HTML5 and CSS3 Techniques You Can Use Today
PPTX
HTML5 for Tablets and Mobile
PPTX
Doing More with LESS for CSS
PPT
Building a Testable Data Access Layer
PPTX
HTML5 and CSS3 Techniques You Can Use Today
PPTX
The Rich Standard: Getting Familiar with HTML5
PPTX
What’s New in ASP.NET 4
Developing a Modern Mobile App Strategy
5 Tips for Better JavaScript
50in50: Resources for HTML5, CSS3, & JavaScript Developers
HTML5 and CSS3 Techniques You Can Use Today
HTML5 for Tablets and Mobile
Doing More with LESS for CSS
Building a Testable Data Access Layer
HTML5 and CSS3 Techniques You Can Use Today
The Rich Standard: Getting Familiar with HTML5
What’s New in ASP.NET 4

Recently uploaded (20)

PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
KodekX | Application Modernization Development
PDF
Electronic commerce courselecture one. Pdf
PDF
cuic standard and advanced reporting.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PPT
Teaching material agriculture food technology
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Encapsulation theory and applications.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Big Data Technologies - Introduction.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
Spectral efficient network and resource selection model in 5G networks
Network Security Unit 5.pdf for BCA BBA.
Reach Out and Touch Someone: Haptics and Empathic Computing
KodekX | Application Modernization Development
Electronic commerce courselecture one. Pdf
cuic standard and advanced reporting.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Per capita expenditure prediction using model stacking based on satellite ima...
Digital-Transformation-Roadmap-for-Companies.pptx
The AUB Centre for AI in Media Proposal.docx
Teaching material agriculture food technology
NewMind AI Weekly Chronicles - August'25 Week I
20250228 LYD VKU AI Blended-Learning.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Encapsulation theory and applications.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Empathic Computing: Creating Shared Understanding
Big Data Technologies - Introduction.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Advanced methodologies resolving dimensionality complications for autism neur...

Building RESTful Applications with OData

  • 1. Building RESTful Applications with the Open Data Protocol Todd Anglin Chief Evangelist, Telerik Level: Intermediate
  • 2. Introductions Todd Anglin Chief Evangelist, Telerik Microsoft MVP ASP Insider President NHDNUG & O’Reilly Author @toddanglin TelerikWatch.com
  • 4. What you should learn today: What is REST/OData Who created REST/OData Why use REST/OData When should you use REST/OData Where can you find REST/OData
  • 5. How did we get here?
  • 6. “ There is a vast amount of data available today and data is now being collected and stored at a rate never seen before. Much, if not most, of this data however is locked into specific applications or formats and difficult to access or to integrate into new uses.”  - OData.org
  • 7. State of Data & Services Internal SQL My App App Data CMS Share Point Cloud Custom API SQL JSON Services FB
  • 8. What is REST? Re presentational S tate T ransfer What is the biggest REST implementation? World Wide Web! REST is NOT a standard! (But it uses standards) HTTP + URLs + XML*
  • 10. REST Illustrated Magic Kingdom (Resource) http://disneyworld.com/parks/magic-kingdom Resource URL Representation URL Click (State Transfer) Representation
  • 11. RESTful Services Core idea: let's have computers use the web the way humans do
  • 12. Alternatives to REST Most common: SOAP and RPC Why use SOAP (vs REST)? Enterprise security features (WS-Security) ACID Transactions (WS-AtomicTransaction) Message error recovery (WS-ReliableMessaging) SOAP services focus on exposing application logic REST services focus on exposing “data” (or CRUD operations on data)
  • 13. OData does for data what REST does for services
  • 14. (Finally!) What is OData? HTTP REST-based services AtomPub Data structure JSON Data delivery format Data silo buster
  • 15. What do web services require? A way to discover a service provider A way to discover available services at a provider A way to describe how to interface with service A way to execute functions provided by a service A standard messaging format A way to represent the data in exchange
  • 16. Why? Interoperability Predictable access to data from any system Gaining popularity SharePoint 2010 SQL Server 2008 R2 IBM WebSphere eXtreme Scale Azure Table Storage Telerik TeamPulse …
  • 17. REST AND ODATA IN ACTION DEMO
  • 18. Consuming OData Windows Phone 7 / iPhone / Mobile AJAX / Javascript PHP / Java / .NET Silverlight PowerPivot Simple HTTP Requests (GET, POST, PUT, DELETE) More…
  • 19. Visual Studio Tools Open Data Protocol Visualizer
  • 21. Creating OData Service As simple as returning proper XML/JSON No specific platform requirements Ways to build: Using Visual Studio tools (WCF Data Services) SharePoint Lists Azure Table Storage Manually produce XML
  • 22. WCF Data Services (Astoria) Build RESTful services on Microsoft platform Roots of OData protocol Built on WCF Supports ATOM (XML) and JSON data representations Automates REST for data Anything that implements IQueryable<T> or IUpdatable<T> EX: EF, LinqToSQL, 3 rd party ORM, etc.
  • 23. WCF DATA SERVICES BASICS DEMO
  • 24. Service Operations Functions exposed by OData Similar to RPC Accept zero or more primitive type input params Can return scalar value [WebGet] is used for an addressable query [WebInvoke] is used for insert, update, and delete http://.../OData.svc/ GetProductsByRating ?rating=5
  • 25. Interceptors Query Interceptors Logic runs when resource is requested Uses: limit the data viewed, log, perform security check Change Interceptors Logic runs when a change (Add/Edit/Delete) request is made (HTTP PUT/POST/DELETE)
  • 26. SERVICE OPS & INTERCEPTORS DEMO
  • 27. Securing Data Services Remember! REST is NOT a protocol, it’s a pattern Same security that applies to HTTP, AtomPub, JSON Other options: EntitySetRights Hiding sensitive data with [IgnoreProperties] Infrastructure security – SSL, IP Filtering QueryInterceptors
  • 28. OData & SharePoint 2010 ListData.svc Out-of-the-box OData access to SharePoint data Data is NOT anonymously available! http://siteurl /_vti_bin/listdata.svc /Announcements
  • 29. When to REST? Stateless web services Scalable web services (via HTTP caching) Mutually understood context (OData) Restricted bandwidth (Mobile) Always, except when there is a reason NOT to REST
  • 30. [Q & A] Thanks! Gracias! Mersi! Blagodarya! @toddanglin telerikwatch.com [email_address]