From 3551a2aba432eba075f75bdcaf99318d4a04e8b8 Mon Sep 17 00:00:00 2001 From: Jimmy99 Date: Wed, 6 Apr 2016 13:08:56 +0200 Subject: [PATCH] Update 08.3.md typographical errors and improved readability --- en/08.3.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/en/08.3.md b/en/08.3.md index 1484de6d..3a337dfc 100644 --- a/en/08.3.md +++ b/en/08.3.md @@ -1,10 +1,10 @@ # 8.3 REST -REST is the most popular software architecture on the internet today because it is founded on well defined, strict standards and it's easy to understand and expand. More and more websites are basing their designs on to top of it. In this section, we are going to have a close look at implementing the REST architecture in Go and (hopefully) learn how to leverage it to our benefit. +REST is the most popular software architecture on the internet today because it is founded on well defined, strict standards and it's easy to understand and expand. More and more websites are basing their designs on top of REST. In this section, we are going to have a close look at implementing the REST architecture in Go and (hopefully) learn how to leverage it to our benefit. ## What is REST? -The first declaration of the concept of REST (REpresentational State Transfer) was in the year 2000 in Roy Thomas Fielding's doctoral dissertation, who is also just happens to be the co-founder of the HTTP protocol. It specifies the architecture's constraints and principles and anything implemented with architecture can be called a RESTful system. +The first declaration of the concept of REST (REpresentational State Transfer) was in the year 2000 in Roy Thomas Fielding's doctoral dissertation, who also just happens to be the co-founder of the HTTP protocol. It specifies the architecture's constraints and principles and anything implemented with this architecture can be called a RESTful system. Before we understand what REST is, we need to cover the following concepts: @@ -18,7 +18,7 @@ Before we understand what REST is, we need to cover the following concepts: Resources are specific information entities that can be shown in a variety of ways within the presentation layer. For instance, a TXT document can be represented as HTML, JSON, XML, etc; an image can be represented as jpg, png, etc. - URIs are used to identify resources, but how do we determine its specific manifestations? You should the Accept and Content-Type in an HTTP request header; these two fields describe the presentation layer. + URIs are used to identify resources, but how do we determine its specific manifestations? You are referred to the Accept and Content-Type in an HTTP request header; these two fields describe the presentation layer. - State Transfer @@ -55,7 +55,7 @@ Figure 8.6 REST's expansibility. Go doesn't have direct support for REST, but since RESTful web applications are all HTTP-based, we can use the `net/http` package to implement it on our own. Of course, we will first need to make some modifications before we are able to fully implement REST. -REST uses different methods to handle resources, depending on the interaction that's required with that resource. Many existing applications claim to be RESTful but they do not actually implement REST. I'm going to categorize these applications into several levels depends on which HTTP methods they implement. +REST uses different methods to handle resources, depending on the interaction that's required with that resource. Many existing applications claim to be RESTful but they do not actually implement REST. I'm going to categorize these applications into several levels depends on which HTTP methods they implement. ![](images/8.3.rest3.png?raw=true) @@ -114,7 +114,7 @@ This sample code shows you how to write a very basic REST application. Our resou ## Summary -REST is a style of web architecture, building on past successful experiences with WWW: statelessness, resource-centric, full use of HTTP and URI protocols and the provision of unified interfaces. These superior design considerations has allowed REST to become the most popular web services standard. In a sense, by emphasizing the URI and leveraging early Internet standards such as HTTP, REST has paved the way for large and scalable web applications. Currently, the support that Go has For REST is still very basic. However, by implementing custom routing rules and different request handlers for each type of HTTP request, we can achieve RESTful architecture in our Go webapps. +REST is a style of web architecture, building on past successful experiences with WWW: statelessness, resource-centric, full use of HTTP and URI protocols and the provision of unified interfaces. These superior design considerations have allowed REST to become the most popular web services standard. In a sense, by emphasizing the URI and leveraging early Internet standards such as HTTP, REST has paved the way for large and scalable web applications. Currently, the support that Go has For REST is still very basic. However, by implementing custom routing rules and different request handlers for each type of HTTP request, we can achieve RESTful architecture in our Go webapps. ## Links