Using OData Data Sources in SharePoint 2013 Solutions

Download Report

Transcript Using OData Data Sources in SharePoint 2013 Solutions

Using OData Data Sources in
SharePoint 2013 Solutions
Hunter Pankey
@thehunterpankey
http://hunterpankey.com
What is OData?
• Protocol for interacting with RESTful
services
• Microsoft Open Specifications
Promise
• Operates over HTTP
• Returns ATOM or JSON
What are RESTful services?
• Focuses on resources
• Relatively simple to use
• Four principles
▫ Use HTTP methods appropriately
▫ Be stateless
▫ Expose data in a directory structure
▫ Transfer either XML or JSON
SOAP vs. REST
SOAP
Data Formatting: XML
REST
Data Formatting: XML or
JSON
Transports: Pretty much
anything
Supports stateful operations
Transports: HTTP
Completely Stateless
Allows for caching results
REST URL Examples
• http://odata.netflix.com/Catalog/Titles and
• http://odata.netflix.com/Catalog/Titles?$filter=
Name%20eq%20'Bad%20News%20Bears'
OData Principles
• Metadata
• Data
• Querying
• Editing
• Operations
• Vocabularies
Data Model
• Entities
• Entity sets
• Relationships
Data Model
• Complex types
• Entity key
• Properties
▫ Declared properties
▫ Open entity types/dynamic
properties
• Operations/Functions/Actions
Data model
• Structural elements
• Row types
• Resources
• Annotations/Vocabularies
Service Model
• Metadata document
• Service document
OData Providers
•
•
•
•
•
SharePoint itself
Azure, Azure Marketplace
SQL Reporting Services
Dynamics CRM
Many public feeds
▫
▫
▫
▫
Netflix
eBay
Twitpic
Windows Live
OData Players
BCS Overview
• Similarities to ORMs
• External Content Types
• Connectors
• SharePoint Interface
BCS Overview
• Metadata store
• Secure Store Services
• External Lists
• New for SharePoint 2013
▫ Performance
▫ Model generation
▫ SharePoint 2013 apps
BCS Stereotypes
Stereotype
HTTP Verb
Example
Finder
Get
http://odata.netflix.com/Catalog/Titles
Specific Finder
Get
http://odata.netflix.com/Catalog/Titles?$filt
er=Name%20eq%20'Bad%20News%20Bears
'
Creator
Post
http://odata.netflix.com/Catalog/Titles
Updater
Put
http://odata.netflix.com/Catalog/Titles?$filt
er=Name%20eq%20'Bad%20News%20Bears
'
Deleter
Delete
http://odata.netflix.com/Catalog/Titles?$filt
er=Name%20eq%20'Bad%20News%20Bears
'
Association Navigator
Get
http://odata.netflix.com/Catalog/Genres('Ho
rror')/Titles
External Lists
• Overview
• Data source
• Improvements in SharePoint 2013
• Export/offline access
Remote Event Receivers
• New in SharePoint 2013
• Added BDC stereotypes
• New Functionality
Demo Time!!!