Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the WCF REST Starter Kit dead in the water?

Tags:

rest

.net

wcf

We are looking at switching from using WCF for our service layer in applications to REST.

So far we are assuming that the way to do this is to use the WCF REST Starter Kit. However this is still in Preview 2 and hasn't been updated since March 2009.

Is this project dead in the water?

If so, what alternatives do we have for creating .NET-based REST services? (Some are suggesting using ASP.NET MVC, which we're already using for our UI layer)

Edit

It looks like now, the WCF REST Starter Kit is indeed dead. The ASP.NET Web API is the recommended alternative.

like image 594
Richard Ev Avatar asked Jun 17 '09 10:06

Richard Ev


3 Answers

After spending a tremendous amount of time playing with different .net rest frameworks I've come to a conclusion. Using asp.net mvc is by far the easiest and most transparent way to handle restful services. There is a whole lot less confusing configuration.

Asp.net MVC

By it's very nature, asp.net mvc fits the restful service methodology. Rather than taking a complicated soap-driven framework and "adapting" it to the restful protocol, asp.net mvc embraces the web programming paradigm at it's core. It's much more transparent and easy to debug. Using the asp.net routing framework, iis requests are wired up to controller classes. Returning any type of content is a breeze. Getting setup is much easier because of the Convention over Configuration philosophy. It just works. 'Nuff said.

Here is the list of projects that I played with while trying to get wcf to work well with rest. I spent days learning about the different approaches. In the end, there were things I liked about each one, but there was nothing that took care of all of our needs. Mvc wins.

WCF Rest Projects


WCF Rest Contrib - wcfrestcontrib.codeplex.com

This project has some really helpful features like zero configuration, error handling (for returning proper web response codes), and web authentication.

It requires you to change the service factory class which creates your wcf service. This means that it cannot play well with other libraries that require you to use their factory.

WCF Rest Starter Kit - code.msdn.microsoft.com/wcfrestlabs/

This is really just a "learning tool" and lab to show how rest could be implemented in wcf. It does not look like it's being updated any more. I think asp.net mvc and wcf 4.0 has taken the wind out of it's sales. It does have some good classes which did end up getting incorporated into wcf 4.0 (Help feature).

Documentation Tools


WCF Rest AutoDocs - autodocs.codeplex.com

Generates really cool, easy to use documentation based on attributes and a new endpoint behavior adapter class.

I hit a big snare with this. When I added it to WCF suddenly posts no longer worked. I kept getting an endpoint not found error. I eventually gave up and stopped using the library. Did not work well with other libraries.

WCF Doc - wcfdoc.codeplex.com

Generates documentation for soap and rest based services. You can create your own xslts and generate cool looking documentation based on your company's branding. I'm currently integrating this into our build process.

like image 130
ryanconnellyatl Avatar answered Nov 02 '22 05:11

ryanconnellyatl


WCF provides support for REST-style services since the release of .Net Framework 3.5, and you can start building REST services on WCF today.

The WCF REST Starter Kit is intended as a vehicle for the team to get feedback from the community on new feature ideas around REST in WCF. We are actively working on incorporating developers' favorite starter kit features in the .Net Framework - for example you can use the help page feature in the recently released .Net 4 Beta 1 release. As we get feedback on starter kit features we consider them for inclusion in the framework, which you can use in production.

Regarding the comments that the starter kit is "dead in the water", I can assure you it's quite to the contrary. We aim for a 4-month development cycle on new versions of the starter kit, as we have stated on the starter kit homepage. We have resources dedicated to supporting the starter kit and working on future versions.

like image 31
Yavor Georgiev Avatar answered Nov 02 '22 05:11

Yavor Georgiev


It depends on your scenarios, but you'll find that WCF REST gets in your way quite a bit to enable certain scenarios.

The starter kit starts to fix some of those issues, others will be fixed with the next version, but if you want things link creation, content type negotiation and custom media types, you're going to be spending a lot of time making it work.

There are other frameworks out there that solve the same problem in a more straightforward fashion, I suggest you have a look at OpenRasta and Snooze, or even MVC.

like image 41
SerialSeb Avatar answered Nov 02 '22 04:11

SerialSeb