What are web services?
Credits. https://labs.tadigital.com/index.php/2018/10/29/web-services-or-web-api/

What are web services?

You probably have built a basic website once. In the same vein you might have created a web application with connection to a database as well. You are familiar with terms like servers and clients (request/response model). To put it simply: API's and web services are the next level. But we'll get to that in a minute. Let's start with the definition of HTTP first, another very frequently used word in web development and engineering.

HTTP

The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. This is the foundation for data communication for the World Wide Web (i.e. internet) since 1990. HTTP is a generic and stateless protocol which can be used for other purposes as well using extensions of its request methods, error codes, and headers.

Source: Tutorialspoint

Web services are services that can be accessed over a network, e.g. our very own internet. It so happens that these web services and their clients communicate via web protocols like HTTP (or FTP).

API (Application Programming Interface)

An API is an interface that can be used to write (or program) software that interacts with an application. In short, an API is a set of functions and procedures that allow you to access and build upon an existing application. API's are everywhere! API's work from behind the scenes. API's are hard to create and come with high maintenance costs, but they provide fast access to third-party sites and shield you from their complexity. Popular examples come from the domain of web API's and include travel booking, credit card transactions, weather updates, streaming services (e.g. Spotify), online shopping, available parking spaces, public holidays, etc. They all effectively store and exchange data by way of an API.

How do web services work?

All web services are API's (but not the other way round) or a flock of them.

What are web services used for?

Modern day business applications make use of a wide range of technology stacks to develop web-based applications (e.g. C, .Net, PHP, AngularJS or Node.js). These applications need to talk to each other (e.g. transferring user credentials to confirm his identity). Since they are built using different development languages, it becomes really difficult to ensure accurate communication between applications. Here is where web services enter the picture. Web services provide a common platform that allows applications with different technology bases to communicate.

XML

Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. The World Wide Web Consortium's XML 1.0 Specification[2] of 1998[3] and several other related specifications[4]—all of them free open standards—define XML.[5]

Source: Wikipedia

A web service supports the XML format for exchanging data between these other applications. As all communication flows in XML, web services are platform- and language-independent.

WSDL

WSDL is short for Web Services Description Language. If a web service is to be callable for clients from the outside, the client needs a description of the service interface. All web services use this standard format to communicate to the client applications in brief what their purpose is and how to access them: methods, input arguments, output parameters. Using a code generation tool the web service code skeleton is produced from the WSDL file itself. The implementation of a WSDL is the XML format.

UDDI (Universal Description, Discovery, and Integration)

UDDI is a specification for a distributed registry of web services where a publisher can add and a client/consumer can locate web services. Its equivalent to the real world is a telephone directory.


You got this! #upskilling

要查看或添加评论,请登录

Ajita Gupta的更多文章

社区洞察

其他会员也浏览了