WCF or ASP.NET Web API?

by p3tch   Last Updated December 07, 2017 10:05 AM

So here's the scenario...

There's a suite of software (almost exclusively .net WinForms). There is currently a janky 'API' that the suite of software uses to add/update/retrieve various objects from an SQL database.

These objects (e.g. Order, Person) are in a shared library used by all the applications in the suite.

For each system (one per customer) there is an instance of the SQL database on their local network, with the API service. The individual WinForms apps can be then used from any computer on the network.

I want to replace the current API with either a WCF Service or a Web API, but I'm not sure which is better suited.

In the future there might be ASP.NET web applications that rely on this API (I'm assuming if I use WCF, ASP.NET applications consume WCF services the same as a WinForms application would?).

It is also possible than in the future the database/API are moved from individual networks to a remote server.

I haven't really touched Web API before, and I can't find any examples of this feature: what I like about WCF is that if I have that shared library in both the service and client applications, I can pass my Order or Person objects around very easily. I don't have to worry about deserialising from xml/json. In each project I can just add the WCF service as a service reference and make the calls 'directly', rather than pointing to specific URLs

Because I've not used Web API and honestly don't know much about it, I'm wondering if there's any benefit using it over WCF. Speed is imperative and the API needs to be able to handle large loads from multiple client applications at once

Tags : .net api asp.net wcf


Related Questions