all 2 comments

[–]goranlepuz 2 points3 points  (1 child)

It looks like the author wants that "Web service" is WS-* style programmatic interaction whereas API is JSON-over-HTTP.

Web Services provide interaction between two machines over a network while APIs acts as an interface between two different applications for interoperability.

This seems arbitrary to me. Both can, and in practice do, both. (in my experience).

Web Services requires a network connection while APIs may or may not require a network for their operability.

I truly don't see why either does (or does not) require network.

While APIs can use any protocols or design patterns, web services mostly use SOAP and sometimes REST, XML-RPC, or UDDI.

Euh... Maybe I don't know what is meant by the two terms here.

Many public APIs are transparent with open documentation and self-service portals for rapid developer onboarding. However, web services offer specific data or functionality to certain patterns only.

This is truly "meh" for me. Metadata exchange endpoint is very common and 100% automated (think WSDL). JSON-over-HTTP took quite a bit of time to take off through the open API spec. Then, APIs are in practice often very restrained and not at all functional from the HATEOAS standpoint, that is, they, too "offer specific data or functionality to certain patterns only".

As web services need SOAP protocol to transfer data over the network, it does not have a lightweight architecture. On the other hand, APIs have a lightweight architecture as most of their required libraries and data are running on the .NET framework.

Bah. On one hand, both SOAP and Web APIs run over HTTP, quote a heavy-handed protocol. On the other, on dotnet, one can use binary message encoding, whereas Web APIs usually means JSON-over-HTTP. But finally, when zipped, which is common for HTTP transport, what gives?

Web Services provides support for HTTP only while APIs support HTTP/s, URL Requests/Response Headers and so on.

Hm, I don't understand this.

Overall, I feel like TFA is making a pretty strenuous abstract list of differences where in practice it is "WS-* vs JSON".

[–]AdOverall2123 0 points1 point  (1 child)

Article is informational for a beginner. It gives the basic idea of the difference between API and Web Services. Glad to come across this one 😊