I’m by no means a native REST-afarian: I was a Microsoftie during the time when SOAP and WS-* were all the rage, and the first version of WCF was released (all lathered up in SOAP) to unify communications in .NET.
But as I do more client-side development – particularly with Silverlight and ASP.NET AJAX – I’ve encountered more and more service scenarios where the REST architecture, and lightweight data formats like JSON, make a lot of sense.
So it’s a case of horses for courses, and very good news that the ultra-extensible WCF now has strong built-in support for both SOAP and REST… and JSON and ATOM/RSS syndication and more.
Get the REST Starter Kit
If you’re interested in WCF’s support for REST, please download the WCF REST Starter Kit, and check out the resources for REST in Windows Communication Foundation linked here.
The REST Starter Kit gives Visual Studio 2008 SP1 a lot of additional helpful functionality for consuming REST services from a client, including the “Paste XML as Types” functionality that got an audible “oooh!” today.
Here’s how it works: You copy some XML into your clipboard, and then use this menu item to paste it into your code as C# classes. Then, you can use the HttpClient classes (found in the Microsoft.Http and Microsoft.Http.Extensions assemblies, also part of the Starter Kit) to load your data into a client app without munging the XML. Very nice, and no “Add Service Reference” magic needed.
More on WCF+REST:
Hope that helps, and happy service building!