Technical Architecture of mobile Internet applications-restful Service

Source: Internet
Author: User
Tags oauth

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

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.