The last session I attended during MIX 2011 was Glenn Block's WCF Web APis: "There's a URI for That". I remember that shortly before the conference Glenn was asking some people to test the initial bits of the new WCF Web API tools, and this was the first time I saw those live.
I was impressed with the lack of complexity - the entire sample block showing the possibility to build a simple web API was up and running in a couple of minutes. Glenn showed a sample using WebSockets and jQuery and how easy it is to return various data in different formats (e.g. JSON, XML or OData) - it was working with simple header modifications. API integration goes as far as to be able to work with other third-party services, like GMail to import contacts.
Glenn also reinforced the importance of HTTP, it being the most frequently used protocol for a wide variety of web APIs that are already out there. HTTP is understood by pretty much any devices that might be using an API - desktop clients, web browsers, mobile clients and integrated units.
The demo was making use of nuget and Autofac - to some extent, the repository pattern was used to show how a manually implemented API is able to manage returned results and also accept new items in the existing set. It is interesting how the entire system was config-less. There is no need to explicitly modify a config file to change the way a service behaves. All configuration is made in code.
I really enjoyed this session because once again there were specific code samples that demonstrated the power of the library set in action. What's exciting is that I can use the existing bits in different hosting environments, so, for example, if I want to host the API in a WPF application, I can totally do this without depending on ASP.NET.