Like many others I am eagerly awaiting the release of SAP Netweaver Gateway, a technology which promises to simplify SAP integration. By exposing SAP Business Suite functionality as REST based OData services Gateway will enable SAP applications to share data with a wide range devices, technologies and platforms in an easy to understand and consume manner.
The intention of this blog is to give a high level overview to the Open Data Protocol (OData), showing by example how to access and consume the services. For a more concise definition I recommend the following recently released article – Introducing OData – Data Access for the Web, the cloud, mobile devices, and more
What is OData?
“OData is to REST what MS Access is to databases..” a complimentary tweet I read, because MS Access is an entry level technology which is easy to learn, it allows users to focus on the data and empowers them to build simple and effective data centric applications.
“OData can be considered as the ODBC API for the Web/Cloud” – Open Database Connectivity (ODBC) is a standard API independent of programming language for doing Create, Read, Update and Delete (CRUD) methods on most of the popular relational databases.
“OData is a data silo buster”
Source: SAPNETWEAVER GATEWAY OVERVIEW
Odata.org provides a sample of the Northwind Database exposed as OData formatted services, this is a great resource for exploring the protocol.
**If you are using IE you may want to disable the feed reading view.
The link below is to the Northwind service document, it lists all of the service operations, each operation represents a collection query-able data.
To access the Customers collection we append the link provided above to the base url as follows
We can accesses specific Customers via the links provided in the feed
With the query string operations we can start to control the data provided, for example paging Customers 20 at a time.
Using filters we can search for Customers in a particular city or Products in our price range
Once we have found the data we wanted we can use the links to navigate to the related data. http://services.odata.org/Northwind/Northwind.svc/Suppliers(2)/Products
Finally we can format the response as JSON
To illustrate how easy it is to consume OData, I am sharing simple JQuery Mobile application, it uses the following tables and relationships.
Opening up more than data
Similar in many ways to ODBC and SOAP, OData is an initiative started by Microsoft as means for providing a standard for platform agnostic interoperability. For it to become successful it needs to be widely adopted and managed.
From a high level the strengths of OData are that it can be used with a multitude of data sources, it is easy to understand and consume. From what I have seen it will be great for simple scenarios and prototyping. Early to tell what its real weaknesses are, however to be simple and easy to use there has to be either a lot of pipes and plumbing or constraints and limitations when used on top of technologies like BAPI’s and BDC’s, things like managing concurrency, transactions and state come to mind. Conversely the threats of not being adopted and competing standards and initiatives like RDF and GData represent some big opportunities for an extensible protocol.