Microsoft MIX 11 – Day Three – The OData Deal Goes Down   2 comments

If I had a gun for every ace I have drawn,

I could arm a town the size of Abilene.

And you know I’m only in it for the gold.

All that I am asking for is ten gold dollars

And I could pay you back with one good hand

You can look around about the wide world over

And you’ll never find another honest man.

Loser – Hunter/Garcia 1971

MIX 11 Day One

MIX 11 Day Two

Mix 11 Day Three

        Microsoft continued today to play the open source hand today on this the final day of MIX 11.  About fifty per cent of the attendees where absent today.  I don’t want to name names but the remaining attendees do not work for the Mephistopheles of Redmond. Open Source in the form of the very nicely developing NuGet was very much in on everyone’s minds.  The Hackers: Phil Haack and Scott Hanselman gave a well attended presentation, “NuGet In Depth: Emerging Open Source on the .Net Platform.”  DSC_0026 The session tape of this presentation needs to be seen to be believed.  The NuGet effort moves way beyond the effort in Codeplex as a open source store of open sourced Dot Net related development efforts.  Continuing on the theme in evidence yesterday the packaging strategy and access methods  for NuGet reminds us of the GEM package system for Ruby AND as embedded in VS2010 looks a lot like the GEM interface found in the late great Aptana IDE for RadRails.  Please do not misunderstand me. I love Ruby and Rudy on Rails and think that embedded the very powerful conventions and concepts into MVC3 and NuGet are a quantum leap forward in Microsoft’s approach to software development.  The fun in programming in Microsoft shops may well be back. We think the commitment to open source co-development of Dot Net Framework products is great.

       OData and the new improved WCF was another hot topic of the day with four sessions devoted to these topics.  The three sessions I attended and would recommend viewing the tapes of are:

Glenn Block: WCF Web APIs

Assad Khan and Maceleo Lopez Ruiz: Data In the HTML World

Jonathan Carter: OData Roadmap

       When first pushed out WCF was primarily a enterprise strength product which was XML and serverDSC_00021 to server or server to (non Web) client oriented product, and it was fine in that role.  But the AJAX services and JSON arrived and pretty much took over the real web where real people and companies actually work.  It has taken some time (and the development of LINQ among other technologies) for MS to catch the wave again.  WCF Data Services are not your older brother’s Web services any more.  With the death of the SVC extension, route mapping and the introduction of the light weight WebGet meta tags WCF services are back in the game as a rock solid Web AJAX source.  The newish API is very rich.  For example a very interesting  HttpResponseMessage object  has been added to the framework to provide us with low level (read header) control over the whole message exchange process which gives us fine granularity, low weight and a greater ability to work in the standards world of HTTP 1.1 raw communication without needed obtuse code.  Better REST and more restful.  Glenn Blocks presentation is a useful introduction to what is happening in this area.

       How does ODataDSC_0027 fit into all this? For a lot of reason too complex ( and mostly sociological) to go into in this post XML never had staying power among the Web first crowd.  JSON has fidelity with the consumer of AJAX calls (being JavaScript and all that) and XML processing in JavaScript is not nearly as fast or as fancy free as a lot of browser coders would like.  OData is based on an open standard (what that means is a little nebulous) and is structured and extensible (and supports namespaces but these are lost in the JSON transformation on the way from the server to the browser).  Microsoft, among other big players, have gotten behind the OData wagon. OData will be supported by Microsoft on the browser and the server side. Khan and Ruiz presentation, “Data In the HTML World” introduced a JavaScript HTML5 library for OData consumers called: DataJS.js (no this is not a typo but the department of name redundancy redundancy).   This open source script library is available via Codeplex(and I think NuGet) and allows a very structured way for (modern) browsers to consume OData shaped data messages.  When the browser requests and receives OData formatted messages via this script from servers not in the domain which originally served up the consuming page the Script uses JSONP – think browser mashups of OData here. All this seems to work cleanly and without undue bit twittering on the JavaScript coders part.  Interestingly and in keeping with the new approach by Microsoft to these problems the demo featured the use of JQuery’s new Template methodologies to display data consumed via DataJS.js.

     Some much for the browser side.  Jonathan Carter’s presentation, “OData Roadmap” brings this all together with the  server side code.  Carter introduced a very interesting open source Dot Net thingy:  The WCF Data Services Toolkit, this Framework Toolket is is open sourced, subject to on going development community development and is available via CodePlex.  The toolkit introduces an IQueryable based OData object which is extensible and who external call syntax is based on well known OData conconical uri’s and data query conventions.  The conventions are for ease of programming and consistency with current practices in the OData community (think Ruby on Rails again here) but can be over ridden as needed. The translation from traditional rectangular database tables to OData is straight forward (well a LOT of Entity Framework and LINQ is going on in the background but the API user does not see this).   Interestingly one can nest OData mappings to different data sources within a single output OData message.  Think server side mash ups here.  A simple clean programming model is provided which is extremely powerful.  Keeping in the Ruby On Rails colorization of the whole MVC3/OData/WCF Toolkit, the demo for this presentation featured a mapping of a Mongo DB data source into OData (with an assist from a NuGet community developed Mongo DB helper assembly).  Combine this with DataJS.js and you pretty much have what you want:  a light, fast, extensible AJAX/REST messaging system.  And who wouldn’t want that?   Now if we can get Web Socket support into the browsers…..

     OK, Folks.  I’ve gotta plane to catch.  See you next year!



2 responses to “Microsoft MIX 11 – Day Three – The OData Deal Goes Down

Subscribe to comments with RSS.

  1. How so?

  2. Pingback: WCF Web APIs Preview 4 :MisfitGeek (Joe Stagner)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: