Discover rest api design guidelines, include the articles, news, trends, analysis and practical advice about rest api design guidelines on alibabacloud.com
effectiveness of the UI, simplicity and beauty, we should also evaluate the effectiveness of the API, simplicity and the elegance of the code!
API design--javascript API design content that presents the only challenge to all developers, whether or not you are developing a
Some suggestions and guidelines on JavaScript API design
This article mainly introduces some suggestions and guidelines on JavaScript API design. It lists many well-known JS APIs for help instructions and strongly recommends them!
Some suggestions and guidelines on JavaScript API design, including javascriptapi
Design is a common concept. It can generally be understood as a Plan or Framework to be prepared in advance. In the Oxford English Dictionary, design is a main thread that binds art, system, ha
Atitit. after upgrading the class library framework API Code Compatibility Design Guide1. increase The API directly, the version number is added 1 above the comment 2. Discard APIs, use your ideas @dep13. Modify the API,14. Modify dependent import, ya Yao Add file mode. Maintain compatibility. 15. preferred to
Modifying data requests(The client provides changed properties)
/v1/collection/id
Complete object information (in JSON format)
201 (Updated)403 (Forbidden)(Servererror)
The following comparison is less used
HEAD
Get metadata for a resource
OPTIONS
Get information,The client can modify the property set.
Whether success
request and response JSON message is shown in table 1.
You must build the consolidation process to complete the scenario described above. The consolidation process acts as a JSON-based REST API to add two numbers to the external world, as shown in Figure 1.
Figure 1. Add two digital-API integration process Design
Fully resource-oriented, the API is represented in plural form
Path (Endpoint)
http://example.com/libraries //列出所有图书馆
http://example.com/books //列出所有图书
http://example.com/libraries/ID/books //列出某个图书馆的全部图书
http://example.com/libraries/ID/books/ID //列出某个图书馆的某本图书
Filter criteria
http://example.com/books?library_id=ID //参数的存在允许AP
The rest architecture is a brand new development style for Web applications. It is the most successful distributed system architecture of Internet hypermedia in the world today. It makes people really understand the original appearance of the HTTP protocol. As the rest architecture becomes the mainstream technology, a brand new way of thinking for Internet network application development has become popular.
processed? It also replicates the data into another piece of memory
So even before we start talking about the real world stream examples and the problems that are caused by using them, it's clear that the stream API itself has a lot of problems, so the first thing to be clear is that pipelines solves the confusionWhat is PipelinesSpeaking of "pipelines", I'm referring to a set of 4 key APIs that enable read and write access to a binary stream decoup
and then resend the document to the API user changes, which can be painful if repeated iterations occur. While there are some API design and documentation tools, such as the Swagger UI, which help developers to write documents more easily, they do not eliminate the complexity inherent in the rest
REST itself is a design style rather than a standard. REST talks about a very important thing, how to use Web standards correctly, such as HTTP and URIs. The best way to learn about REST is to think about and understand the Web and how it works . If you design an application
, because This rest limits the operation of HTTP to a URL resource within the four of get, POST, put, and delete. This kind of design and development method for network application can reduce the complexity of development and improve the scalability of the system.
Rest Design Guide
This article mainly introduces some suggestions and guidelines on the design of JavaScriptAPI. it lists many well-known jsapis for auxiliary instructions and strongly recommends them! It is a common concept for a friend who needs to refer to the design. generally, it can be understood as a plan or framework for a specific part to be prepared. In the Oxford Englis
Some of the preparatory knowledge required in this article can be seen here: http://www.cnblogs.com/cgzl/p/9010978.html and http://www.cnblogs.com/cgzl/p/9019314.htmlTo establish a Richardson maturity Level 2 post, GET, PUT, PATCH, delete restful API see here: Https://www.cnblogs.com/cgzl/p/9047626.html and https:/ /www.cnblogs.com/cgzl/p/9080960.html and Https://www.cnblogs.com/cgzl/p/9117448.htmlThis article will start the Web
, otherwise the rest request will be rejected. Of course, Developers can note that the following parameter rest no longer requires authentication. Java code
In addition, letting ACTIVEMQ broker provide rest services does not seem to be a good architectural design, which limits the developer's extensibility to
defined by the HTTP method. These HTTP methods usually match the following curd actions:
Create:post
Read:get
Update:put or patch
Delete:delete
I am the split line of Meng MengThe 1.2 Wiki describes rest in this way :
A resource is specified by a URI.
Operations on resources include acquiring, creating, modifying, and deleting resources that correspond exactly to the get, POST, put, and Delete methods provided b
RESTful design Method 1. Domain nameThe API should be deployed under a dedicated domain name whenever possible.https://api.example.comIf you determine that the API is simple, there is no further extension, consider placing it under the primary domain name.https://example.org/api/2. Version (Versioning)The version numbe
First, what is rest?Rest is not the word "rest", but a few acronyms-representational state Transfer Direct translation: Presentation layer status transfer, but this translation normal people simply do not understand, find a best understanding of the argument is that theURL location resources, Use the HTTP verb (get,post,delete,detc) to describe the operation .Ii.
Designing a good rest-style API is very difficult! The API is the contract between the service provider and the consumer, and breaking the contract will bring a lot of trouble to the server developers, the trouble comes from the developers who use the API, because changes to the AP
Objective:Recently, using SPRINGMVC to write a lot of rest API, feel really a good framework. Some of the previous articles on rest APIs are still not perfect. For example, when the parameter is missing, the type mismatch situation, directly throws an exception, the content returned is the wrong page of the researcher, rather than JSON content, which makes the mo
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.