Web service vs. Web API

Source: Internet
Author: User

Original address: North Cloud software-web Services vs. Web API

Web Services are standardized and defined by the consortium.

WEB Services is published online and can be advertised to a global registry that automatically provides service URLs, service descriptions, interface invocation requirements, parameter descriptions, and return value descriptions. For example, the China Meteorological Bureau can issue weather forecasts. All other websites or mobile apps can access the Web service to get data if they need to integrate the weather forecast feature.

The main design goal of WEB Services is to provide public services.

Web Services is all XML-based. Describe the various aspects of the service (parameters, parameter passing, return values, Service Release discoveries, etc.) in accordance with the standards. To describe all aspects of the Web Services standard, you may need a 2000-page document.
WEB Services also has a standard authentication method (the user identity is verified when not a public service).

Lightweight Web API

Private services used internally by the company, we know its interface URL, so we don't need to discover it automatically. We have its service interface documentation, so we don't need automatic description and automatic invocation.
Even though the features of Web services (auto-discovery, automatic learning invocation) are nice, private services often don't need them.

The Web API is generally based on http/rest, and nothing needs to be defined, parameters (input data) can be JSON, XML or simple text, the response (output data) is generally JSON or XML. It does not provide service invocation criteria and service discovery criteria. You can write some simple instructions to users according to the characteristics of your service.

The way to get remote data is transitioning from Web services to the Web API.

The architecture of Web services is much more bloated than the Web API, and each of its requests needs to be encapsulated into XML and unpacked on the server. Therefore it is not easy to develop and eat more resources (memory, bandwidth). Performance is not as good as the Web API.

Web service vs. Web API

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.