0% found this document useful (0 votes)
141 views

REST Architecture

REST (REpresentational State Transfer) is an architectural style for building web services. It uses HTTP and standard internet media types to access resources via URIs. Resources are accessed using common methods like GET, POST, PUT, DELETE. REST services are stateless and cacheable, and can include additional middleware layers. JSON is a popular data format used to represent resources.

Uploaded by

Sunil Nain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
141 views

REST Architecture

REST (REpresentational State Transfer) is an architectural style for building web services. It uses HTTP and standard internet media types to access resources via URIs. Resources are accessed using common methods like GET, POST, PUT, DELETE. REST services are stateless and cacheable, and can include additional middleware layers. JSON is a popular data format used to represent resources.

Uploaded by

Sunil Nain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

What is REST architecture?

REST stands for RE presentational State Transfer. REST is web standards based architecture and uses
HTTP Protocol. It revolves around resource where every component is a resource and a resource is
accessed by a common interface using HTTP standard methods. REST was first introduced by Roy
Fielding in 2000.

In REST architecture, a REST Server simply provides access to resources and REST client accesses and
modifies the resources. Here each resource is identified by URIs/ global IDs. REST uses various
representation to represent a resource like text, JSON, XML. JSON is the most popular one.

HTTP methods

Following four HTTP methods are commonly used in REST based architecture.

 GET − Provides a read only access to a resource.

 POST − Used to create a new resource.

 DELETE − Used to remove a resource.

 PUT − Used to update a existing resource or create a new resource.

What Are RESTful Web Services?


RESTful web services are built to work best on the Web. Representational State Transfer (REST) is an
architectural style that specifies constraints, such as the uniform interface, that if applied to a web
service induce desirable properties, such as performance, scalability, and modifiability, that enable
services to work best on the Web. In the REST architectural style, data and functionality are
considered resources and are accessed using Uniform Resource Identifiers (URIs), typically links on
the Web. The resources are acted upon by using a set of simple, well-defined operations.

Why Restful
RESTful applications use HTTP requests to post data (create and/or update), read data (e.g., make
queries), and delete data. Thus, REST uses HTTP for all four CRUD (Create/Read/Update/Delete)
operations.

Restful mostly came into popularity due to the following reasons:

1. Heterogeneous languages and environments – This is one of the fundamental reasons which is
the same as we have seen for SOAP as well.

 It enables web applications that are built on various programming languages to


communicate with each other
 With the help of Restful services, these web applications can reside on different
environments, some could be on Windows, and others could be on Linux.

2. The event of Devices – Nowadays, everything needs to work on Mobile devices, whether it be the
mobile device, the notebooks, or even car systems.

3. Finally is the event of the Cloud – Everything is moving to the cloud. Applications are slowly
moving to cloud-based systems such as in Azure or Amazon. Azure and Amazon provide a lot of API’s
based on the Restful architecture. Hence, applications now need to be developed in such a way that
they are made compatible with the Cloud. 

RESTFul Principles and Constraints


The REST architecture is based on a few characteristics which are elaborated below. Any RESTful
web service has to comply with the below characteristics in order for it to be called RESTful. These
characteristics are also known as design principles which need to be followed when working with
RESTful based services.

1. RESTFul Client-Server

This is the most fundamental requirement of a REST based architecture. It means that the server will
have a RESTful web service which would provide the required functionality to the client. The client
send’s a request to the web service on the server. The server would either reject the request or
comply and provide an adequate response to the client.

2. Stateless

The concept of stateless means that it’s up to the client to ensure that all the required information is
provided to the server. This is required so that server can process the response appropriately. The
server should not maintain any sort of information between requests from the client. It’s a very
simple independent question-answer sequence. The client asks a question, the server answers it
appropriately. The client will ask another question. The server will not remember the previous
question-answer scenario and will need to answer the new question independently.
3. Cache

The Cache concept is to help with the problem of stateless which was described in the last point.
Since each server client request is independent in nature, sometimes the client might ask the server
for the same request again. This is even though it had already asked for it in the past. This request
will go to the server, and the server will give a response. This increases the traffic across the
network. The cache is a concept implemented on the client to store requests which have already
been sent to the server. So if the same request is given by the client, instead of going to the server, it
would go to the cache and get the required information. This saves the amount of to and fro
network traffic from the client to the server.

4. Layered System

The concept of a layered system is that any additional layer such as a middleware layer can be
inserted between the client and the actual server hosting the RESTFul web service (The middleware
layer is where all the business logic is created. This can be an extra service created with which the
client could interact with before it makes a call to the web service.). But the introduction of this layer
needs to be transparent so that it does not disturb the interaction between the client and the server.

5. Interface/Uniform Contract

This is the underlying technique of how RESTful web services should work. RESTful basically works on
the HTTP web layer and uses the below key verbs to work with resources on the server

 POST – To create a resource on the server

 GET – To retrieve a resource from the server

 PUT – To change the state of a resource or to update it

 DELETE – To remove or delete a resource from the server

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy