BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

WCF Web APIs

by Jonathan Allen on Jan 31, 2011 |

Most developers first use WCF as a way to expose SOAP-based Web Services. But despite the name, Web Services are not really well suited for building web sites. XML and JSON-based REST services are simply a better fit for most projects. Microsoft has recognized this and is working on a project to bring WCF up to date with modern standards.

WCF Web APIs is a set of libraries on CodePlex offered on a preview basis. There are two major projects being offered right now. The first is WCF HTTP, a new HTTP server and client stack. Microsoft claims that the client is implemented “very tightly in accordance with the HTTP Spec” which allows it to consume any HTTP service. Extension methods are included to make mapping the HTTP message to .NET classes.

On the server side, the HTTP Channel stack is platform agnostic. In theory it works just as well running inside ASP.NET, on IIS, or as a stand-alone service. In this sense it doesn’t seem very different from what WCF already offered, but there are some notable improvements. The HTTP Channel, Dispatcher, and Service components are designed with plenty of extension points that give developers far more control over the pipeline than traditional WCF services.

The second project is called WCF jQuery Support. This project is designed to make it easy for WCF developers to expose services in a format that jQuery developers find natural. This means JSON based messages on the client side. On the server the parameters and return values can either be mapped to a normal user defined class or handled late bound via the JsonValue class.

It should be noted that WCF Web APIs are not production ready nor are they open source. While the source code is provided, it is only done so on a reference basis so that Microsoft can solicit feedback.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT