1

I've been doing some research into which protocol / technology stack to use when creating a web service and I would like to get a clear answer on it which I haven't had so far.

Basically my question is which is what's the difference between Web API (Probably used more as an RPC style as opposed to REST) and WCF with JSON endpoints exposed?

Is there a difference, should the client technology come into it (WPF vs HTML / JS)?

WCF I know has a multitude of configuration options which can be set in a web.config or an app.config which means it can also be hosted in a Windows Service or even a Console Application. This means the config can be changed without the need for re-compilation. Can the same be said for Web API?

Also, a lot of my GET operations rely on taking a "Filter" object which contains options for searching data so the typical "api/{controller}/{action}/{id}" format just doesn't cut it.

I realize this may come across as an opinion based question but I'm after facts between the two options not opinions or preferences.

Thanks in advance, Stephen

Stephen Wilson
  • 1,484
  • 1
  • 15
  • 30

1 Answers1

2

There is a good explanation Here on SO

Basically, it depends on what you need it for. If you just want simple services, web api is the way to go. If you need to serve up multiple endpoints from a single service using REST, SOAP, JSON or do more performance related services using TCP, WCF is the way to go.

Community
  • 1
  • 1
Mike
  • 3,186
  • 3
  • 26
  • 32