0

I'm building a Web API to access my database. I would like to create a Single Page Application Website first then a iPhone, Android and Windows application. Classic.

My data and business layer are already finished.

  1. First I decided to build a Json WCF Webservice. In Visual Studio I created a WCF Service Application. I modified the Web.config file to accept Json requests and implemented my interface and svc file.

  2. After that I discovered ASP.NET Web Application with the Web API template. So I decided to change and to create a real web API with this full website structure.

Now I'm lost. What are the differences between these two possibilities to create a Web API?

Bastien Vandamme
  • 17,659
  • 30
  • 118
  • 200
  • I found an answer here https://social.msdn.microsoft.com/Forums/en-US/8198fcb4-396a-4ded-9c45-160106dc8b9f/wcf-service-application-vs-aspnet-web-service-application?forum=asmxandxml All new web service development should be done using WCF. The "ASP.NET Web Service" templates are still left for legacy purposes. But the answer is from 2009... – Bastien Vandamme Oct 16 '14 at 08:46
  • 1
    That link is talking about the asmx web services, not Web API. Web API is better suited for Http Rest services while WCF is a more generic service oriented framework. See [this msdn comparison](http://msdn.microsoft.com/en-us/library/jj823172(v=vs.110).aspx) – Daniel J.G. Oct 16 '14 at 09:19

1 Answers1

2

A comparative from microsoft : http://msdn.microsoft.com/en-us/library/jj823172(v=vs.110).aspx

Personnaly, I prefer WCF because the datacontracts are generated in the case of SOAP Web Services with WSDL files.

k4st0r42
  • 1,174
  • 1
  • 15
  • 29