The last couple of days have been all about getting over my jetlag and spending time with Mel. We went for a great walk yesterday to blow off the cobwebs and just hung out together. In amongst all that hanging out I have been digesting some of the OData videos from Mix10 and gaining some clarity on just what it is. Hopefully this post will give someone else some clarity as well.

What I find especially cool about OData is that it realises the possibility of bringing together disparate data sources in a consistent manner thus simplifying the ability to create an application that combines data from different sources seamlessly.

So what is OData? Well it is closely related to WCF Data Services which at one point were called ADO.NET Data Services and originally had a code name of Astoria. You can get the history over at Wikipedia here.The official website can be found here www.odata.org and it’s a really nicely laid out site. Simple but informative. I think Microsoft are going for the OpenSource angle here with the look and the content and I would say they have succeeded. The more cynical out there might see this as somehow sinister. I choose to see this as Microsoft maturing and speaking the language that developers (in particular OpenSource developers) want to hear.

Ok you still haven’t answered my question. What is OData?

OData

Well as it says over there, it’s the Open Data Protocol.

Having watched the videos, ferreted around a bit and used WCF and ADO.NET plenty over the years I see the OData Protocol as being the glue that is needed to bring together diverse sets of data in an Open and Standard way.

It’s built on Open Standards after all; REST, HTTP, XML, Atom and JSON.

It lets us consume data in a standard way on both the client and server and over HTTP. Even cross domain calls are easy.

What I find especially cool about OData is that it realises the possibility of bringing together disparate data sources in a consistent manner thus simplifying the ability to create an application that combines data from different sources seamlessly.

And it doesn’t end there. It does so in a web friendly way giving us access to Read/Write data using standard HTTP urls with as fine a grain of control as we require and utilising standard web security protocols.

jQuery Support

And the good times just keep on coming as it plays well with the likes of jQuery supporting the standard JSON format. Slightly off topic here is that Microsoft is collaborating with jQuery to include Templating, Script Loading and client-side data binding which makes it extremely easy to bind the results of an OData request on the client.

Data Mashups

As I have already alluded to OData makes it very easy to combine data from disparate sources once they support the OData protocol. This brings me to the next epiphany that I have had with OData and that revolves around the fact that systems tend to evolve over time. You end up with perhaps one application to manage a Catalog of items. Another application might be your front end website that takes orders and yet another might manage your customer data.

At the heart of all these systems is data. When all that data lives in one big monolithic database things can be easy to manage but it may not scale well. When the data is spread across systems it may not be in the same format. Oracle here, SQL Server there, a dash of Access Data or maybe a bunch of flat files. Heck even a Sharepoint data store and as of Sharepoint 2010 all Sharepoint data is accessible via OData. Cool!

What these all have in common is data that makes up your system as a whole but in varying formats and when you employ development resources they may not have experience in accessing one or more of these systems. This becomes a massive headache.

But, if all of those system expose their data in a standard format such as OData there exists one standard way to access that data and all of sudden things become a whole lot easier. Those disparate systems don’t seem so far apart anymore and they have a common glue that binds them all together.

By the way, this isn’t just about reading data. We are talking full support for CRUD operations and even batch updates to support transactions.

How much of this functionality you support is entirely up to you but all the interfaces exist to enable all of these common requirements and in a web friendly way.

Developer Support

OData is not restricted to Microsoft Developer tools. It is an open standard and there are many different client libraries available including javascript, PHP, Objective-C and of course .NET Framework.

The producers of OData data sources of course include then latest Microsoft offerings such as Sharepoint 2010 (which I am very excited about), SQL Server Reporting Services, SQL Azure and more or build your own. Some of the live OData data sources available right now include NetFlix, Associated Press or check out the ‘Dallas’ project for a whole slew of others.

Conclusion

I couldn’t possibly cover everything there is to about OData in this article but I would encourage you to check out the links throughout this article and explore. This is perhaps the most exciting Data Protocol I have seen in quite some time. I say that is it builds beautifully on existing tried and true technologies like LINQ, WCF and open standards.

BondiGeek