Restful is a network-based software system architecture. Distribution and scalability are preferred, rather than security, error handling, and object ing.
Therefore, the restful architecture is especially applicable to the rapidly growing Internet and mobile Internet fields of users. It seems easy to understand that the concept of resource status transfer is the core concept.
However, in actual implementation of restful services, there are still some application traps, partly because restful itself is not a mandatory constraint, but only a style suggestion,
This is partly due to the developer's ignorance or misunderstanding of restful.
The design of a system restful APIS is concise and elegant, so that users can be comfortable and follow the same style/specification. There is no doubt that a good architect needs to do this.
For example, how to use restful to provide API interfaces for user registration, login, and account information updating in an online mall system is not as simple as crud ing.
The following are the required read operations related to the restful service.ArticleProvides a precise explanation of almost all restful problems.
1. Doctoral thesis by fielding, author of restful Style
Http://www.ics.uci.edu /~ Fielding/pubs/Dissertation/top.htm
2. Restful practices restful HTTP in practice
Http://www.infoq.com/articles/designing-restful-http-apps-roth
3. versioning rest services
Http://www.informit.com/articles/article.aspx? P = 1566460
Although the version and resource representation formats are not so restful in the URL, they are also advantageous, concise and intuitive, and easy to check problems from system logs.
4. How to handle non-Crud actions, such as door/1/lock, user/1/login etc... basically, you can add a state attribute (sub-Resource) to a resource to become a verb.
Http://stackoverflow.com/questions/16091947/how-to-route-non-crud-actions-in-a-restful-asp-net-web-api
Consistent URL styles facilitate the unified Establishment of URL ing rules in configuration to avoid special processingCodeHard encoding,
If you put the verb register/login in a URL, it looks intuitive, but you need to write a specific URL ing to introduce hard codes.
5. Restful Service Security Solution oauth/oau2is widely used, such as Facebook
Http://oauth.net/2/
By iefreer