OData Fundamental

sahasannub 388 views 10 slides Nov 14, 2016
Slide 1
Slide 1 of 10
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10

About This Presentation

OData Fundamental


Slide Content

Md. Kamrul Hasan Sr. Software Engineer & Instructor https://bd.linkedin.com/in/kamrul-hasan-29361224 OData Fundamental

Agenda What is OData? Why OData? OData Resource identification. OData Resource operation. OData Resource representation. OData Query Option Parameters. Tools & Libraries Demo

A standard API for Data Access Best way to REST . Queryable and interoperable RESTful APIs. OASIS -approved industry standard. Uniform way to describe both data and the data model . What is OData?

Why OData why not RESTful Services. REST is an architectural style, but it is not a standard. It leaves few design decisions open to us. How should we name our resources? How should we support paging? What about data shaping or querying data? Which status code should be returned? Well this is where OData comes into the picture.

OData Resource Identification . http://services.odata.org/v4/OData/OData.svc/Products /$count service root URI resource path query options (optional) Entity-set /Products SingleEntry /Products(1) MemberAccess /Products(1)/Price LinkTraversal /Categories(2)/Products URI Format: JSON: http ://services.odata.org/v4/OData/OData.svc/Products?$ format=json Atom: http://services.odata.org/v4/OData/OData.svc/Products?$ format=atom

OData Resource operation. GET POST PUT PATCH DELETE

OData Resource representation. OData uses different formats for representing data and the data model. Data: JSON, Atom(xml) http:// services.odata.org/v4/OData/OData.svc/Products Data Model: CSDL (Common Schema Definition Language) http:// services.odata.org/v4/OData/OData.svc/$metadata

OData Query Option Parameters. All Product http :// services.odata.org/v4/OData/OData.svc/Products Product By Key http:// services.odata.org/v4/OData/OData.svc/Products(1) More Filter .. OData.svc /Products ?$ orderby =Rating .. OData.svc /Products ?$top=5 .. OData.svc /Products /?$ filter=Price lt 100 .. OData.svc /Categories(1)/Products(1)/Supplier/Address/City

Tools & Libraries RESTier provides facilities to bootstrap an OData service like what WCF Data Services (which is sunset ) does. XOData is a generic OData API/Service visualizer and explorer .

Demo https:// github.com/EhanAreesha/ODataFundamental Thanks 11/14/2016