SlideShare a Scribd company logo
GAININGTHE KNOWLEDGEOF
THE OPEN DATA PROTOCOL
(ODATA)
ChrisWoodruff
WHO I AM?
ChrisWoodruff
MVP,Visual C#
Director at Perficient
Co-host of Deep Fried Bytes Podcast
@cwoodruff / cwoodruff@live.com
Skype: cwoodruff
YOUWILL LEARN:
 Understand the background of OData
 Have an understanding of the OData protocol
 How to produce an OData feed using WCF Data
Services
 How to produce an OData feed using ASP.NET
Web API
 How to consume an OData feed using LINQ
BACKGROUND
Knowledge of OData
QUOTE
Today, the tools for capturing
data both at the mega-scale
and at the milli-scale are just
dreadful. After you have
captured the data, you need
to curate it before you can
start doing any kind of data
analysis, and we lack good
tools for both data curation
and data analysis.
Jim Gray
Problem: Data APIs frequently
create more problems than
solutions
THISTALK IS ABOUT ONE SOLUTION.
SURVEY
…knows what the web is
…are comfortable w/ HTTP and
XML? JSON?
…have a basic understanding of
the term REST
…have created a Data API
Is there really a problem?
What is it?
QUIZTIME
FACEBOOK: WHAT FIELDSWILL I
GETWHEN I READ A POST?
FACEBOOK: HOW DOYOU LIKE A
POST?
How do developers
know what to do?
SO GIVENTHAT NOBODY KNEWTHE ANSWERSTOTHESE
QUESTIONS,
I GUESSTHEY USE DOCS
So is there really a problem?
Yes
DEVELOPERS DON’T HAVETIMETO ACTUALLY READTHE DOCS
Can OData Magically cure the
problem? No, but it can help.
LET’S SEE HOW
THE PROTOCOL
Knowledge of OData
THE BASICS OF ODATA
Feeds, which are Collections of typed Entities
OData services can expose Actions and Functions (v4),
Services (v3)
OData services expose all these constructs via URIs
OData service may also expose a Service Metadata Document
FULL SQL LIKE QUERY
“LANGUAGE”
HTTP Command
(Verb)
SQL
Command
GET SELECT
PUT UPDATE
POST INSERT
DELETE DELETE
THE $METADATA ENDPOINT
CONVENTIONS
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
URL CONVENTIONS
$filter
/Suppliers?$filter=Address/City eq 'Redmond‘
$orderby
/Products?$orderby=ReleaseDate asc, Rating desc
$top and $skip
/Products?$top=5&$skip=2
$select and $expand
/Products?$select=*,Category/Name&$expand=Category
COMBINING UEL CONVENTIONS
http://.../Players/
?$skip=10
&$top=2
&filter=substringof(‘Wood',nameLast)
&$orderby=nameLast%20desc
&$select=nickname,yearBorn,nameFirst
&$format=json
PAYLOAD CONVENTIONS
 Success and error Codes
 200 OK, 201 Created, 415 Unsupported MediaType, etc
 Overall Format
 JSON
 AtomPub
 JSONVerbose
 Nuances
 PATCH, Null payloads, etc
JSON FORMAT
 Friendly to Javascript
 90% more compact than AtomPub
 Reads like a custom API
 Very little OData “gunk”
ATOM FORMAT
 Atom parsers exist in many frameworks
 Element fields can be mapped to their Atom
counterparts
 A good example of OData interoperability
WHAT ELSE CANYOU DO WITH
ODATA?
 Actions and Functions allow hypermedia-based
method calls (non-CRUD operations)
 Defined conventions for PATCH and deep insert
 Vocabularies
ODATA ISN’T ALWAYSTHE BEST
FIT
 OData may not be a good fit for highly opinionated APIs
laden with developer intent
 OData may not be a good fit for bulk data transfer
 OData may not be a good fit for the APIs that dramatically
different in shape than the backend
ODATA DOES NOT SUPPORT ALL
QUERIES
 OData doesn’t currently support aggregation
 You can’t ask for customers that have at least 2 orders
 OData doesn’t currently support filters expansions
 You can’t ask for a customer and only their orders placed in 2013
 OData doesn't support “graph” queries
 You can ask friend-of-a-friend type queries, but there are limitations
ODATA IS A STANDARD!!
 OASIS, ISO
 Ratified in March!
WHO USES ODATA?
WHAT DOES ODATA GIVE ME AND
MY ORGANIZATION?
Empower Internal
Power Users
Empower Existing and
Future Customers
Monetize Data for
untapped Revenue
CREATING FEEDW/
ASP.NETWEB API
Knowledge of OData
ASP.NETWEB API
DEMO
ODATA BEST PRACTICES
(PRODUCER)
 Always design your OData feed will server-side paging if your
entity collections hold large amounts of data.
 Looks at server-side validation of queries and data updates
based on the user credentials sent through HTTP
CONSUMING ODATA
Knowledge of OData
WHAT IF DATA API’S WERE LIKE…
LINQ?
 What are the last 50 invoices we sent?
 context.Invoice.OrderByDescending(i=>i.PostedAt).Take(50);
 What are the invoices from the last 24 hours?
 context.Invoice.Where(i=>i.PostedAt >
DateTime.Now.AddDays(-1));
 How many $1M invoices have we sent?
 context.Invoice.Where(i=>i.TotalAmount >= 1000000);
ODATA BEST PRACTICES
(CONSUMER)
 Use Query Projection to only bring back the entity properties
you or your app needs.
 Think about client-side paging even if their exists server-side
paging.
 Design and implement a client-side data caching function in
your app (unless sensitive data).
WHY AREWE EXCITED!!
WRAP-UP
Knowledge of OData
The demo projects can be found at:
github.com/cwoodruff/
RESOURCES
REST
http://www.ics.uci.edu/~taylor/documents/2002-
REST-TOIT.pdf
OData
http://odata.org
http://odataprimer.com
CONTACT ME
Chris “Woody”Woodruff
cwoodruff@live.com
Twitter @cwoodruff
Skype cwoodruff
http://chriswoodruff.com
http://deepfriedbytes.com

More Related Content

PPTX
Gaining the Knowledge of the Open Data Protocol (OData) - Prairie Dev Con
PPTX
The Top Tips You need to Learn about Data in your Mobile App
PPTX
Learning How to Shape and Configure an OData Feed for High Performing Web Sit...
PPTX
Learning How to Shape and Configure an OData Service for High Performing Web ...
PPTX
API Design Tour: Dell
PPTX
OData and SharePoint
PPTX
OData Services
PDF
Apache Olingo - ApacheCon Denver 2014
Gaining the Knowledge of the Open Data Protocol (OData) - Prairie Dev Con
The Top Tips You need to Learn about Data in your Mobile App
Learning How to Shape and Configure an OData Feed for High Performing Web Sit...
Learning How to Shape and Configure an OData Service for High Performing Web ...
API Design Tour: Dell
OData and SharePoint
OData Services
Apache Olingo - ApacheCon Denver 2014

What's hot (14)

ODP
Introduction to OData
PDF
A Look at OData
PPTX
PPTX
OData Introduction and Impact on API Design (Webcast)
PPTX
OData: A Standard API for Data Access
PPTX
OData for iOS developers
PPT
Building RESTful Applications with OData
PPTX
Open Data Protocol (OData)
PPTX
Odata - Open Data Protocol
PPTX
JAX-RS 2.0 and OData
PPTX
Introduction To REST
PPTX
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
PPT
How to separate the f2 e and sde in web development for_taobao
PDF
The Digital Cavemen of Linked Lascaux
Introduction to OData
A Look at OData
OData Introduction and Impact on API Design (Webcast)
OData: A Standard API for Data Access
OData for iOS developers
Building RESTful Applications with OData
Open Data Protocol (OData)
Odata - Open Data Protocol
JAX-RS 2.0 and OData
Introduction To REST
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
How to separate the f2 e and sde in web development for_taobao
The Digital Cavemen of Linked Lascaux
Ad

Viewers also liked (6)

PPT
Cosmetology, trichology courses
PPTX
Build Conference Highlights: How Windows 8 Metro is Revolutionary
PPT
Parade Plan V1.0
PPTX
Connecting to Data from Windows Phone 8
PPTX
Connecting to Data from Windows Phone 8
PPT
Beneficial courses for medical profession.
Cosmetology, trichology courses
Build Conference Highlights: How Windows 8 Metro is Revolutionary
Parade Plan V1.0
Connecting to Data from Windows Phone 8
Connecting to Data from Windows Phone 8
Beneficial courses for medical profession.
Ad

Similar to Gaining the Knowledge of the Open Data Protocol (OData) (20)

PPTX
Consuming Data From Many Platforms: The Benefits of OData - St. Louis Day of ...
PPTX
Salesforce External Objects for Big Data
PPTX
Producing an OData feed in 10 minutes
PPTX
Real-Time Web Applications with ASP.NET WebAPI and SignalR
PPTX
OData - The Universal REST API
PPTX
Breaking down data silos with OData
PPTX
OData Fundamental
PPTX
Develop iOS and Android apps with SharePoint/Office 365
PDF
RESTfulDay9
PPTX
Building nTier Applications with Entity Framework Services (Part 2)
PPTX
#SPSOttawa introduction to the #microsoftGraph
PPTX
Connecting to Data from Windows Phone 8 VSLive! Redmond 2013
PPTX
Que hay de nuevo en Visual Studio 2013 y ASP.NET 5.1
PPT
Mobility & Data Strategies
PPTX
Practical OData
PPTX
Building nTier Applications with Entity Framework Services (Part 2)
PPT
Advanced Web Development
PPTX
PHP on Windows and on Azure
PPTX
IT Summit - Modernizing Enterprise Analytics: the IT Story
PPTX
OData – Super Cola W3
Consuming Data From Many Platforms: The Benefits of OData - St. Louis Day of ...
Salesforce External Objects for Big Data
Producing an OData feed in 10 minutes
Real-Time Web Applications with ASP.NET WebAPI and SignalR
OData - The Universal REST API
Breaking down data silos with OData
OData Fundamental
Develop iOS and Android apps with SharePoint/Office 365
RESTfulDay9
Building nTier Applications with Entity Framework Services (Part 2)
#SPSOttawa introduction to the #microsoftGraph
Connecting to Data from Windows Phone 8 VSLive! Redmond 2013
Que hay de nuevo en Visual Studio 2013 y ASP.NET 5.1
Mobility & Data Strategies
Practical OData
Building nTier Applications with Entity Framework Services (Part 2)
Advanced Web Development
PHP on Windows and on Azure
IT Summit - Modernizing Enterprise Analytics: the IT Story
OData – Super Cola W3

More from Woodruff Solutions LLC (9)

PPTX
Gaining the Knowledge of the Open Data Protocol (OData)
PPTX
Developing Mobile Solutions with Azure Mobile Services in Windows 8.1 and Win...
PPTX
Learning How to Shape and Configure an OData Feed for High Performing Web Sit...
PPTX
Pushing Data to and from the Cloud with SQL Azure Data Sync -- TechEd NA 2013
PPTX
Developing Mobile Solutions with Azure and Windows Phone VSLive! Redmond 2013
PPTX
AzureConf 2013 Developing Cross Platform Mobile Solutions with Azure Mobile...
PPTX
Sql Azure Data Sync
PPTX
Sailing on the ocean of 1s and 0s
PPTX
Breaking down data silos with the open data protocol
Gaining the Knowledge of the Open Data Protocol (OData)
Developing Mobile Solutions with Azure Mobile Services in Windows 8.1 and Win...
Learning How to Shape and Configure an OData Feed for High Performing Web Sit...
Pushing Data to and from the Cloud with SQL Azure Data Sync -- TechEd NA 2013
Developing Mobile Solutions with Azure and Windows Phone VSLive! Redmond 2013
AzureConf 2013 Developing Cross Platform Mobile Solutions with Azure Mobile...
Sql Azure Data Sync
Sailing on the ocean of 1s and 0s
Breaking down data silos with the open data protocol

Recently uploaded (20)

PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
top salesforce developer skills in 2025.pdf
PPTX
Essential Infomation Tech presentation.pptx
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
AI in Product Development-omnex systems
PDF
System and Network Administraation Chapter 3
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Reimagine Home Health with the Power of Agentic AI​
PPTX
ai tools demonstartion for schools and inter college
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
Introduction to Artificial Intelligence
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
How to Choose the Right IT Partner for Your Business in Malaysia
Operating system designcfffgfgggggggvggggggggg
Upgrade and Innovation Strategies for SAP ERP Customers
top salesforce developer skills in 2025.pdf
Essential Infomation Tech presentation.pptx
Odoo Companies in India – Driving Business Transformation.pdf
Design an Analysis of Algorithms II-SECS-1021-03
VVF-Customer-Presentation2025-Ver1.9.pptx
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
AI in Product Development-omnex systems
System and Network Administraation Chapter 3
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Reimagine Home Health with the Power of Agentic AI​
ai tools demonstartion for schools and inter college
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Odoo POS Development Services by CandidRoot Solutions
Introduction to Artificial Intelligence
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Internet Downloader Manager (IDM) Crack 6.42 Build 41

Gaining the Knowledge of the Open Data Protocol (OData)