DEV Community

Sardar Mudassar Ali Khan
Sardar Mudassar Ali Khan

Posted on

Introduction of REST Architecture

An architectural design approach for creating networked applications is called REST (Representational State Transfer). It offers a collection of guidelines and rules that direct the creation of web services and API (Application Programming Interface) endpoints. Over the HTTP protocol, the backbone of the World Wide Web, REST has emerged as the architectural paradigm for creating distributed systems.
In his doctoral dissertation from 2000, Roy Fielding outlined the fundamental ideas of REST. The necessity for scalable and interoperable web systems drove Fielding, one of the key creators of the HTTP protocol, to develop REST.
REST is based on the following key principles:

Client-Server Architecture:

Clients and servers make up the system. Servers receive requests from clients, process them, and reply with the results. Because of this division, clients, and servers can grow independently and scale.

Statelessness:

Every request made by a client to a server must include all the data required to comprehend and handle it. Any client-specific context shouldn't be kept on the server between queries. As a result, servers are extremely scalable and conveniently cacheable.

Uniform Interface:

For the interaction between clients and servers, REST specifies a standardized set of restrictions. These cover performing operations on resources using conventional HTTP methods (GET, POST, PUT, and DELETE), identifying resources using URIs (Uniform Resource Identifiers), and navigating the application state using hypermedia (links).

Cache ability:

Clients or middlemen (such as proxy servers) might cache server responses to enhance performance and lighten the server's burden. By inserting cache directives in the HTTP headers, cache functionality is accomplished.

Layered System:

The architecture can be composed of multiple layers, where each layer provides a specific set of functionalities. This allows for flexibility and encapsulation of different components of the system.

Stateless Communication:

The client and server should communicate tastelessly, which means that each request from the client should provide all the details the server needs to comprehend and process it. A client-specific state is not kept on the server between requests.
These guiding concepts are used to create RESTful APIs. Clients can interact with the resources they expose via regular HTTP techniques. Resources are exposed as URLs. The formats of the responses are commonly JSON or XML, making it simple to integrate them with many platforms and programming languages.
REST guidelines can help developers build scalable, loosely linked, and interoperable systems. Because of REST's ease of use, scalability, and compatibility with the current web architecture.

Top comments (0)