Customer Facilities, WCF or Web API?

Asked

Viewed 3,488 times

0

I need to create a web service for data insertion in a database that requires validation to ensure data integrity.

I have as a requirement, to facilitate the use of my "clients". Therefore, I must opt for WCF (SOAP) or Web API (Rest)?

2 answers

2

The two technologies can help you. In my opinion, you should opt for the technology that is closest to your knowledge.

For example, WEB API supports HTTP only. WCF supports several other protocols such as http, TCP, and UDP. There are other differences that should help you in choosing.

This article can help you. http://msdn.microsoft.com/en-us/library/jj823172%28v=vs.110%29.aspx

  • 1

    Although the article is interesting, it was not a better idea to make a short transcription with the important points so that those who see the question do not go unanswered if the link is inactive?

2

As always, the answer is "depends". What do you mean by "facilitate" customers? What features are needed for the service? How the service will be exposed, especially in relation to security issues?

WCF (or some other SOAP alternative) has the advantage that it is relatively easy to create a proxy (a class with methods equivalent to service operations) that the customer can use to call the service. Whether you have strong security requirements (such as authentication of clients via certificates) or need typical web services functionality (such as Reliable messaging, WS-Security, etc.) then WCF should be a better option.

Web API, by default, does not have the facility to generate a proxy for the customer to consume the service, but if this is the only problem you can provide an "SDK" (some utility classes) that can be used by the customer to consume their service. As @Venatci mentioned, Web API only supports HTTP, but if it’s HTTP you need, this support is much better than WCF and you’ll probably implement the service more efficiently. However, for the client this shouldn’t make much difference (after all for the service - independent of being WCF / Web API / other - the "client" is just a group of bytes that is coming into the socket where the service is running.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.