May04

WCF Web API

I listened to a really good HansleMinutes yesterday about WCF. I was actually going to skip it, but the title said “This is not your fathers’ WCF”.

I am glad I listened because the conversation was mostly around new initiatives in WCF, specifically the WCF Web API. Glenn Block has an entire blog post on the topic WCF Web APIs, HTTP your way. That post does a great job giving the high level overview.

Visit the WCF Codeplex site for the complete code and early release bits.

What’s the Big Idea?

To me the big idea was that you can expose a WCF service endpoint over HTTP with only HTTP messages (very lightweight).

Imagine you have a heavy service with lots of contracts for your “serious” API work, but you need to expose something trivial as well (think a simple time service to ensure the service endpoint is up, and our clocks are close enough together). Normally you would probably switch to using asmx or a simple SOAP service for this service. But you don’t have to do that, you could use WCF.

The problem with WCF has always been the abstractions away from the transport (HTTP in most cases). This is fine for well designed systems with lots of layers. But when you want something quick, it can be a pain to build and deploy. And then what if you want to evolve it? Good luck with versioning. Using a simple HTTP service makes that story much easier.

Links

Visit the WCF Codeplex site for the latest details

Comments are closed