Traditional Culture Encyclopedia - Weather inquiry - What's the difference between REST API and WebService?
What's the difference between REST API and WebService?
So I understand that the webservice defined for the rest architecture actually defines an excuse specification.
In fact, REST is not a protocol or a standard, but an interpretation of the original intention of Http protocol design. Today, the Http protocol is widely used, and it is increasingly used as a transport protocol, rather than the application protocol originally considered by designers.
The concept of rest can be summed up in the following points:
1. resource-oriented interface design
All interface designs are designed for resources, which is very similar to the difference between our object-oriented and process-oriented designs, except that the operating entities on the network are now regarded as resources, and the design of URI also reflects the positioning design of resources. As will be mentioned later, the API design of some websites is said to be REST design, but it is actually a mixture of RPC and REST, not the idea of REST.
2. CRUD based on abstract operations
This is very simple. Get, put, www. Hbbz08.com post and delete in Http correspond to four operations, namely reading, updating, creating and deleting. If it is only the operation of resources, it is enough to abstract into these four operations, but for some complex business service interface design, such abstraction may not be enough. In fact, this also exposes such problems in the API design of the following websites. If we want to design completely according to the idea of REST, the applicable environment will be limited and not universally applicable.
3.HTTP is an application protocol, not a transport protocol.
This is clearly reflected in the API analysis of major websites. Some websites actually follow the old path of SOAP, saying that they are conceptual designs of REST, but actually they have made a set of private SOAP protocols, so they are called REST-style custom SOAP protocols.
4. Stateless and independent
In fact, this is not only for rest, but also for interface design. It is also the most basic guarantee of scalability and efficiency, even for WebService using SOAP.
- Previous article:Will cold weather lead to insufficient tire pressure?
- Next article:Albert Kesselring's aviation expert
- Related articles
- How to open the weather forecast with telecom card
- Anzihe Nature Reserve, Chongzhou Anzihe
- Excuse me, who knows the application of humidity in all aspects, why the concept of humidity should be introduced into meteorology, and what is the use?
- When a person encounters bad weather and unfortunately falls into a desert island, what three things should he take with him?
- Dream Huizhou
- What are the specialties of Qinzhou?
- Is there a saying that old people are buried?
- How to wipe your ass? Always wipe your hands. What are the correct steps? How to wipe your ass?
- Why is it so hot in Ankang?
- Why is the weather so abnormal in 2008? (Beijing, Tianjin, Shandong, Hebei and other places)