Search code examples
wcfwcf-restwcf-web-apiasp.net-web-api

WCF REST - Myriad of ways to create - How to choose?


I am learning to create RESTful services using WCF. There are a myriad of options to choose from. I am confused as to what should i use. 1.)REST Starter kit - Seems to be obsolete 2.)WCF WEbhttp service 3.)WCF Web API 4.)ASP.NET web api

I dont want to use ASP.NET MVC to build RESTFul services. I dont like the idea of services being in the same solution structure of a presentation layer. So what is it i should use?ASP.NET web api seems to be having going down the MVC route where the requests are handled by a controller which i feel does not fit into a "Service" terminology.


Solution

  • Take a look a that

    Microsoft support for REST is moving to ASP.NET WebApi, but you are still free to use webhttpbinding to build your api if you want. The starter kit is no longer developed nor supported.

    I don't get this part though

    I dont like the idea of services being in the same solution structure of a presentation layer.

    You can build a webapi project in a different assembly than your web (presentation logic) project, and the solution it's only useful for you to keep all the things in one place, it does not affect the behavior of your projects/assembly, you can still use them/develop them independently. If you don't like the "style" of webapi (it's certainly "different" from what WCF developers are used to) it's another story.