Rest architecture in WCF one (rest overview)

Source: Internet
Author: User
Tags definition range response code web services

Different people seem to have different definitions of rest, some are very strict, and others are more liberal. I tend to think that the rest architecture exists in a continuous range,

As shown in the figure:

The basic idea behind rest is that we can think of the following:

· The simpler the better.

· The web has been a very successful one.

· The web is very simple.

· Web design is guided by a number of guiding principles that have been reliable for a long time in the past.

· Web services are designed to be web-style. Although different people have different definitions of rest, it is certain that there are characteristics that affect whether a service is restful, or it can not be considered a restful, or whether it falls somewhere in the contiguous range above. Some (not all) features are listed here:

· The rational use of the HTTP method (Get,put,post,delete is the primary HTTP method) tends to be strictly defined for the specific scenarios used by the--hi-rest.

For example, a hi-rest implementation uses the Get method to obtain, the Delete method is used to remove, the Put method is used to insert or update, and the Post method is used to append. The Lo-rest solution may use the Post method to insert, update, Delete, and attach operations.

· Selection of data representations--hi-rest solutions tend to choose standard data representations, while some lo-rest solutions think Pox is a good choice.

· The use of well constructed URIs--hi-rest solutions tend to use descriptive URIs and generally do not use query strings, and we can see the use of query strings in some lo-rest solutions.

· Other: The payload contains links to relevant information, using the appropriate HTTP response code. I didn't give a strict definition of what rest was, because I didn't think it mattered. The reason is that a specific definition does not matter from a WCF perspective. WCF supports the REST architectures (Hi-rest and Lo-rest) at both ends of the scope.

In fact, in the next article, I'll build a lo-rest implementation, and in the following article I'll demonstrate the implementation of the Hi-rest end. If none of this means anything to you, it doesn't matter, and the following article will provide a concrete example.

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.