We are in the prototype phase of developing a Rest Based Service to expose data as ODATA and also operations to internal clients. Initially I was evaluating WCF Rest, WCF Data Services but now seems like Asp.net Web API looks like the newer alternative.
Is there any guidance when to use which kind of technology and also on the future (Microsoft Support) for each of these technologies?
Does the Asp.net Web API replaces WCF Rest & WCF Data Services? Will Microsoft continue to invest in WCF Rest and WCF Data Services?
In elorative explanation or articles would be helpful to clear out my confusion on these technologies.
I have to agree that I share your uncertainty, byunru.
Personally I do not see why WCF Data Services is not a candidate for merging into ASP.NET Web API and have one single way of exposing REST API's whether they are custom or OData. That way the choice would be simple.
Everything you expose via a REST API tends to have a data context anyway and I have found you need to use bits of ASP.NET MVC even when using WCF Data Services to host things. I remain to be convinced that these technologies should not be aligned.
There are actually several flavors of WCF support for RESTful services:
WCF Web HTTP - Shipped in .NET 3.5 and .NET 4. Anything that shipped in the .NET Framework will be supported for years to come.
WCF REST Starter Kit - Shipped out of band on CodePlex. While not a supported framework, the starter kit explored some early ideas around building REStful services that made there way into .NET 4 and also ASP.NET Web API.
WCF Web API - Shipped on CodePlex and NuGet. ASP.NET Web API is effectively the next version of WCF Web API rebuilt to align with the web platform. WCF Web API is not a supported framework and its related content will be pulled down by the end of the year.
So, you can still build RESTful services using WCF in .NET 4 and if you have existing SOAP assests then this might be your best bet. For new projects we recommend using ASP.NET Web API.
If you need full OData support then you should use WCF Data Services as the support for OData in ASP.NET Web API is very limited.
We are about to build a RESTful service offering for our ecommerce platform. A number of these services will be going live in a few months and used by ASP.Net Webforms applications. Given that MS REST support is shifting out of WCF, and ASP.Net Web API
is still in beta, that leaves me with a rather uncomfortable stone in my stomach as I consider technology selection. Is there an indication of when/how ASP.Net Web API will be released? I assume it will be part of the next Framework release, correct? Will Framework
4.0 continue to be supported as it is in the current beta?
I would love to embrace ASP.NET Web API, however I have a customer that is naturally skiddish about beta versions of software and will want to have more information concerning release targets -- as well as production support on a pre-release technology.
Given the circumstances, if ASP.Net Web API is too young for us just now, would you recommend WCF Web HTTP as the alternative?
This is a misconception about ASP.NET Web API framework that its going to replace WCF. Its just another way of building services that are non-SOAP based e.g. plain XML, JSON string etc.
Windows Communication Foundation is designed to exchange SOAP-based messages using variety of transport protocols like HTTP, TCP, NamedPipes or MSMQ etc. While ASP.NET API is a framework for building non-SOAP based services over HTTP only.
trsuman
Member
13 Points
10 Posts
WCF Rest Vs WCF Data Services Vs Web Api
Feb 21, 2012 08:57 PM|LINK
We are in the prototype phase of developing a Rest Based Service to expose data as ODATA and also operations to internal clients. Initially I was evaluating WCF Rest, WCF Data Services but now seems like Asp.net Web API looks like the newer alternative.
Is there any guidance when to use which kind of technology and also on the future (Microsoft Support) for each of these technologies?
Does the Asp.net Web API replaces WCF Rest & WCF Data Services? Will Microsoft continue to invest in WCF Rest and WCF Data Services?
In elorative explanation or articles would be helpful to clear out my confusion on these technologies.
ColinBlair
Member
146 Points
36 Posts
Re: WCF Rest Vs WCF Data Services Vs Web Api
Feb 21, 2012 10:21 PM|LINK
I hear that more complete messaging on this will be coming soon. In short:
Yes, ASP.NET Web API replaces WCF REST. WCF REST is no longer supported.
No, ASP.NET Web API does not replace WCF Data Services.
WCF Data Services is the full OData service stack, it both enables and defines OData.
ASP.NET Web API only supports a very small subset of OData.
Upshot Blog
ColinBlair on Twitter
MVVM and RIA Services
byunru
Member
3 Points
1 Post
Re: WCF Rest Vs WCF Data Services Vs Web Api
Feb 25, 2012 07:59 AM|LINK
if we want to expose OData, we still uncertain which way is better for the long term.
Yes, NOW ASP.NET Web API ONLY supports a very small subset of OData, but Microsoft
didn't tell us its future direction. favor WCF Data Services or ASP.NET Web API.
or still provide more than one way to expose OData.
colmac73
Member
4 Points
3 Posts
Re: WCF Rest Vs WCF Data Services Vs Web Api
Feb 27, 2012 03:12 PM|LINK
I have to agree that I share your uncertainty, byunru.
Personally I do not see why WCF Data Services is not a candidate for merging into ASP.NET Web API and have one single way of exposing REST API's whether they are custom or OData. That way the choice would be simple.
Everything you expose via a REST API tends to have a data context anyway and I have found you need to use bits of ASP.NET MVC even when using WCF Data Services to host things. I remain to be convinced that these technologies should not be aligned.
danroth27
Member
174 Points
40 Posts
Microsoft
Re: WCF Rest Vs WCF Data Services Vs Web Api
Feb 27, 2012 04:11 PM|LINK
There are actually several flavors of WCF support for RESTful services:
So, you can still build RESTful services using WCF in .NET 4 and if you have existing SOAP assests then this might be your best bet. For new projects we recommend using ASP.NET Web API.
If you need full OData support then you should use WCF Data Services as the support for OData in ASP.NET Web API is very limited.
Senior Program Manager
ASP.NET
danroth27
Member
174 Points
40 Posts
Microsoft
Re: WCF Rest Vs WCF Data Services Vs Web Api
Feb 27, 2012 04:12 PM|LINK
To be clear, the WCF REST Starter Kit is no longer supported. WCF Web HTTP support in .NET 4 is alive and well.
Senior Program Manager
ASP.NET
HickmanA
Member
2 Points
1 Post
Re: WCF Rest Vs WCF Data Services Vs Web Api
Feb 28, 2012 09:00 PM|LINK
Hi Daniel,
We are about to build a RESTful service offering for our ecommerce platform. A number of these services will be going live in a few months and used by ASP.Net Webforms applications. Given that MS REST support is shifting out of WCF, and ASP.Net Web API is still in beta, that leaves me with a rather uncomfortable stone in my stomach as I consider technology selection. Is there an indication of when/how ASP.Net Web API will be released? I assume it will be part of the next Framework release, correct? Will Framework 4.0 continue to be supported as it is in the current beta?
I would love to embrace ASP.NET Web API, however I have a customer that is naturally skiddish about beta versions of software and will want to have more information concerning release targets -- as well as production support on a pre-release technology. Given the circumstances, if ASP.Net Web API is too young for us just now, would you recommend WCF Web HTTP as the alternative?
Thanks,
Al Hickman
imghani
Member
154 Points
39 Posts
Re: WCF Rest Vs WCF Data Services Vs Web Api
Aug 23, 2012 10:07 AM|LINK
This is a misconception about ASP.NET Web API framework that its going to replace WCF. Its just another way of building services that are non-SOAP based e.g. plain XML, JSON string etc.
Windows Communication Foundation is designed to exchange SOAP-based messages using variety of transport protocols like HTTP, TCP, NamedPipes or MSMQ etc. While ASP.NET API is a framework for building non-SOAP based services over HTTP only.
1. WCF or WebAPI
2. WCF or ASP.NET Web APIs - My two cents on the subject.
WCF Tutorials