I had the pleasure of attending my first MIX conference last week. I never thought that at my first time at the conference, I’d actually be a presenter. I remember the first time i went to a different Microsoft conference, PDC, where I attended the presentations of renown technologists and wondered if I’d ever be up on stage. Well, i had the honor of being invited to present due to my roll on the MySpace Developer Platform REST API.
I was first approached by the REST API Manager/Visionary, Paul Walker, in mid-January about the prospects of co-presenting at MIX with him. Without hesitation, i accepted but had no clue what he wanted to present, and when we would find the time to prepare for the presentation. After all, we were in the middle of the release of MDP, and i was about to have a baby. Nevertheless, the opportunity was too great to pass up. It was mid-February and Paul wasn’t even sure he wanted to present. In the end, I was able to talk him into it, but a day later my wife went into labor and i left the earth’s orbit for at least 10 days..,
Well, to make the long story short, I found out that I’m going to be the only presenter, and the MySpace team wouldn’t be able to make it. Nervous as i was, i began to doubt whether to go through with it or not; i hadn’t seen the slides until the day i flew out to vegas, all the WCF guys were expecting a large MySpace presence, and I’m was just getting back into orbit. Anyhow, I eventually decided to go through with it, and Aaron Sloman, CEO of speakTECH (and my current employer) came to the rescue to help with the opening of the presentation. After no sleep, frantic demo development, and pathetic practice sessions, the 3 pm deadline approached. We were pulling out slides, adding new ones, and just hoping that our prod environment for the demo would not send back a cryptic error just by visiting the default page. Up on stage, Aaron and I looked at the MySpace API tool we were supposed to demo, and it was failing to return the request. So we had to improvise.
Aaron had a great opener. At the very first MIX in 2005, Aaron presented Vista gadgets using MySpace photos. In the audience someone shouted, "open up your API." A few years later, Aaron was back at MIX announcing that MySpace API, albeit only 6 months after development started on it. :)

I then took over with the technical stuff. I spoke about the principles of REST, and how an API using RESTful services made sense to us. Then I jumped into how WCF actually implements RESTful services. I genuinely believe our API is the first of its kind. That is, its the first fully RESTful service built upon WCF. We actually started development with WCF 3.5 beta 2 out in August. The bits we needed for our API were not RTM until December, when we already reached critical milestones in the API development. Add to that the total absence of documentation, we were able to impress the internal WCF team with what strides we were able to take WCF to. Some of the cool features created were custom channels that could be turned off and on real easily. These channels would effectively intercept messages high in the call stack to do specific functions on incoming requests. Our demo showed off two custom channels: OAuth and HighLowREST.
The OAuth channel provides a layer of authentication checking per the newly adopted OAuth standard that is currently being flaunted on the web.
The HighLowREST channel is a bit more complicated. For those familiar with REST, they know that HttpMethods are the vehicle of all requests, and that PUT and DELETE are two valid Http methods. Many clients out there, however, do not support PUT and DELETE calls simply because they haven’t had common usage for the past decade or so. In order to bridge those "Low-REST" clients into our "High-REST" service which supports PUTs and DELETEs, we had to add a custom channel to make the service agnostic to that complexity. More details in the video though :) .

We also added cool http-like exception handling. You can now throw a ResourceNotFoundException or a BadRequestException anywhere in the code, and it will transform to the appropriate http status code on the reply (i.e. 404, 403).
I am definitely leaving out much more of what we did in our demo, but the good news is that we made it available for people to download. The theme adopted by some of the MySpace guys on the presentation was a RESTful Chess API where you can PUT chess moves, and GET game moves, etc.. Get the source code here.

The video for the session is also available online at visitmix.com, or you can just get it directly through here

All in all, the presentation went well thanks to all the help and effort that went into it. The WCF evangelist Vittorio Bertocci was more than helpful and patient with us. He also blogged about it on his site.