What is Web service?

Source: Internet
Author: User

Written in front: from C ++ application software to. NET web, there are many concepts that have not been touched before. For example, Web Service, just getting started is confused. Fortunately, this articleArticleSolved the problem for me.

Author: Ruan Yifeng

I believe that the next generation of Internet software will be built on web services (that is, the "Cloud.

I put my study notes and my learning experiences on wangzhi. please correct me.

Today, I want to write a basic question: What is Web service?

1. Concepts of Web Service

To understand web services, you must first understand what services are ).

TraditionallyProgram(Daemon) provides a function called "service ). For example, if an anti-virus software runs in the background and it automatically monitors the system, such automatic monitoring is a "service ".Generally speaking, "service" is a function that computers can provide.

Depending on the source, the "service" can be divided into two types: one is"Local Service"(The service provided by the same machine does not require a network"Network Service"(The service provided by another computer must be completed through the network ).

For example, I have a batch of images that need to be halved. Then, we can regard "Scaling images" as a service. You can use the "local service" to zoom out images with software on your computer, or use the "Network Service" to upload images to a website so that the server can zoom out images for you, and then send it back to you through the network. This is like you can do one thing yourself or another person. If you are hungry, you can cook by yourself or call to order a pizza so that the store can deliver it to you.

The essence of "Web Service" is to call resources of other websites through the network.

For example, I wrote a "Sichuan earthquake photo wall" last year, which dynamically displays the latest pictures about the Sichuan earthquake. However, all the images are not stored on my server, but are from flickr.com. I just sent out a dynamic request and asked flickr.com to provide images to me. In this case, flickr.com provides a web service. If I store images on a local server and do not call flickr.com, I am using the "local service ".

Therefore, Web Service allows your website to use resources of other websites, such as displaying weather, maps, and the latest developments on Twitter on the webpage.

Ii. Web Service Architecture and cloud

If the main part of a software uses "network service", that is, it outsourced the storage or computing link "to other websites, then we say this software belongs to the Web service architecture.

The basic idea of the web service architecture is to give non-core functions to others as much as possible, and develop core functions by yourself.For example, if you want to develop an album software, you can use the network service of Flickr to store all the photos on it. You only need to do your best to prepare the album itself. In general, all functions that do not belong to your core competitiveness should be "outsourced.

Recently, the popular "cloud computing" (cloud computing) or "cloud services" (cloud services) are actually synonymous with web services, but they are more vivid. They don't say you give things to other computers, but you give things to cloud.

Iii. Local Service Defects

"Network Service" is the trend of software development and use in the future. Local services will be used less and less, mainly for the following three reasons:

* Insufficient local resources. A lot of data and materials are not available locally, and only need to be sent to other websites.

* Cost factors. Local services are often non-economical, and professional website services are cheaper. This involves hardware and personnel. Even if you can afford hardware, it is very troublesome to find a person to manage the system.

* Poor portability. If you want to port the services on the local machine to another machine, it is often very difficult, especially in cross-platform scenarios.

Iv. Advantages of Web Service

In addition to the disadvantages of local services, Web services have the following advantages:

* Platform-independent. No matter what platform you use, you can use web service.

*Programming LanguageIrrelevant. As long as you comply with the relevant protocols, you can use any programming language to request web services from other websites. This greatly increases the applicability of Web Services and reduces the requirements for programmers.

* For Web service providers, the deployment, upgrade, and maintenance of web services are simple and can be completed at one time without considering client compatibility issues.

* Web service users can easily implement the aggregation of multiple types of data and services (mashup), so they can do things that were not previously imagined.

V. Development Trend of Web Service

According to my observations, there are several development trends in Web Services.

* In terms of usage, RPC and soap are used less, and restful architecture is dominant.

* In terms of data format, the use of XML is decreasing, and the use of lightweight formats such as JSON is increasing.

* In terms of the design architecture, more and more third-party software allows users to directly communicate with the cloud on the client (that is, the browser), instead of using third-party servers for data transfer or processing.

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.