Hello Everyone, in this video we will discuss how API is different From web services Web services and APIs are two of those overlapping tech terms that regularly get confused. You might have even heard these words used interchangeably, but the question is are they even the same thing? While they do have some overlap, web services and APIs are two different concepts. API and Web service serve as a means of communication.
The only difference is that a Web service facilitates interaction between two machines over a network. And An API acts as an Interface between two different applications so that they can communicate with each other.
Now, let's see the difference between both of them First one is related to Definition An API, or Application Programming Interface, is a set of definitions and protocols that allow one application to communicate with another application.
Web Service, As described by the World Wide Web Consortium (W3C), Web services provide a standard means of Interoperating between two different software applications, running on a variety of platforms and/or frameworks. A web server running on a computer listens for requests from other computers. When a request from another computer is received, over a network, the Web service returns the requested resources. This request could be JSON, XML, an HTML file, Images, Audio Files, etc.
Next is need for network, APIs Need not Always need network. APIs can be online or offline While web services always need network To work. All APIs are not web service. But all web services are API. APIs are lightweight, it is lightweight architecture and Good for devices which have limited bandwidth Like mobile devices.
On the other hand web services require SOAP protocol to send and receive data over the network so it is not light weight architecture. API can have any style of communication.
While Web Services has only 3 styles SOAP, REST and XML-RPC. Web Services Only have http protocol and If we talk about API, it has http protocol With URL, Request/Response Headers, caching, versioning, content formats etc. An API can be hosted on any application or within IIS. Which is Internet Information Services Server.
But web services can only be hosted on IIS, APIs are generally open source It is open source and can be use by client and that understand XML or JSON. Many public APIs are transparent, with open documentation and self-service portals for quick development on-boarding. While a big no for web services. It is not open source but can be used by any client that understand XML. They tend to offer specific data and/or functionality to specific partners. That's all for today. Thank you very much see you next article. That's all. Thank you for reading this article.
Also Read this Article :