📜 ⬆️ ⬇️

A Minute of Theory: Understanding RESTful Applications

We regularly talk about our own developments and expert experience related to web technologies. Recently, we looked at a case for scaling a web application in Ruby and talked about how you can speed up the loading of web pages.

Today we decided to understand the terminology and consider a term that is well known to everyone. This is a RESTful application. The Lauren Long material , which works at Recurse Center, helped us with this.



/ Photo by Juhan Sonin / CC
')
Few could get past the term REST. It is used including in relation to the category of RESTful-applications. If you expand the abbreviation, you will see Representational State Transfer or "transfer of information about the state."

This term was suggested by Roy Fielding (Roy Fielding) in his thesis, which has already become a classic in the field of web technologies. He formulated the basic principles of the web device in the form of a specific toolkit or architectural paradigm. In order to apply an application to the RESTful type, it is necessary that it satisfies these principles.

1. The main point - the customer-svvenoe interaction. The opposite example is event-based-architecture - there will no longer be one-on-one work.

2. Stateless-approach - to complete the work, the client and server do not need to store information about the previous state of each other. Each individual request is completely independent.

3. Typical interaction protocols — from URI and HTTP to JSON format — well-defined interfaces that give both sides all the necessary information for work (self-descriptive). Here it is important to understand that each of the interactions is autonomous (p. 2).

4. Additional conditions are the presence of caching (the ability to store self-descriptive responses), the assumption of a multi-level system of interaction between the client and server (proxy, load balancing), gateways and encoding on demand (optional, example - JavaScript).

That's all. Today we have dealt with one of the most popular terms and spent on it just a couple of minutes of your time. We hope that it turned out useful and understandable.

Source: https://habr.com/ru/post/274881/


All Articles