REST(REPRESENTATIONAL STATE
TRANSFER)


REST is an acronym for Representational State Transfer.



REST is a style of so...
REST concept


The architecture consists of clients and
servers, requests and responses.



Requests and responses are b...
REST concept
Client(s)

Request

Response

(Representations)
(Resources)

Server
How REST works?







Give every “thing” an ID(URI)
Link things together
Use standard methods(HTTP etc)
Resources wi...
URI(uniform resource identifier)








Resources are referred to individually with a
universal resource identifier, ...
Stateless


All requests made to connectors must contain
all the information necessary to understand
that request without...
REST concept


A client can be either transitioning between
states or be at rest.



A client is considered to be transi...
REST concept


A client in a rest state is able to interact with its
user.



A client at rest creates no load on the se...
REST constraints
The REST architecture describes the following
six
constraints to implement this concept:
• Client-server
...
Client-server
Clients are separated from servers by a
uniform interface. So we have a separation
of concerns:
– Clients ar...
Stateless






No client context is stored on the server
between requests.
Each request from any client contains all o...




simplifies server
improves scalability
improves reliability
Cacheable








Clients are able to cache responses.
Responses must, implicitly or explicitly, define
themselves as...
Uniform interface

A uniform interface between clients and
servers
simplifies and decouples the architecture.


This enab...
Layered system










A client cannot ordinarily tell whether it is
connected directly to the end server, or to ...
Code on demand (optional)


Servers are able temporarily to extend or
customize the functionality of a client by the
tran...
Advantages




With RESTful design, Web services can be
seen as simply a means of publishing
information, components and...












Offers possibilities for thin client development as less client
code is required.
Does not require expli...
Disadvantages







HTTP as a uniform interface presents
technical challenges for real time
asynchronous events to a ...
some major brands using
REST
Upcoming SlideShare
Loading in …5
×

Rest surekha

343 views

Published on

ideal rest

Published in: Design, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
343
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Rest surekha

  1. 1. REST(REPRESENTATIONAL STATE TRANSFER)  REST is an acronym for Representational State Transfer.  REST is a style of software architecture for distributed systems such as the World Wide Web.  Rest is created to serve as the guiding framework for the web protocol standard.  REST can be seen as a post hoc description of the features of the World Wide Web.  The original description was used to develop the HTTP/1.1 standard
  2. 2. REST concept  The architecture consists of clients and servers, requests and responses.  Requests and responses are built around the transfer of representations of resources.  Clients contain representations, servers the resources (concepts) themselves.
  3. 3. REST concept Client(s) Request Response (Representations) (Resources) Server
  4. 4. How REST works?      Give every “thing” an ID(URI) Link things together Use standard methods(HTTP etc) Resources with multiple representations Communicate statelessly
  5. 5. URI(uniform resource identifier)     Resources are referred to individually with a universal resource identifier, such as the URL used for Web addresses. a uniform resource identifier (URI) is a string of characters used to identify a name of a web resource . Such identification enables interaction with representations of the web resource over a network (typically the World Wide Web) using specific protocols. Schemes specifying a concrete syntax and associated protocols define each URI. An URI identifies a resource either by location, or a name, or both. A URI has two specializations known as URL and URN.
  6. 6. Stateless  All requests made to connectors must contain all the information necessary to understand that request without depending on any previous request. This contrasts with the way many Web sites use cookies to maintain data between sessions. With REST, all messages must include all information necessary to understand the context of an interaction.
  7. 7. REST concept  A client can be either transitioning between states or be at rest.  A client is considered to be transitioning between states while one or more requests are outstanding.  The representation of the client state contains links that can be used to initiate new state transitions.
  8. 8. REST concept  A client in a rest state is able to interact with its user.  A client at rest creates no load on the servers or the network.  A client at rest consumes no per-client storage on the servers.
  9. 9. REST constraints The REST architecture describes the following six constraints to implement this concept: • Client-server • Stateless • Cacheable • Uniform interface • Layered system • Code on demand [optional]
  10. 10. Client-server Clients are separated from servers by a uniform interface. So we have a separation of concerns: – Clients are concerned with the presentation to the user and the application state – Servers are concerned with data storage, domain model logic etc. improves UI portability simplifies server enables multiple organizational domains
  11. 11. Stateless    No client context is stored on the server between requests. Each request from any client contains all of the information necessary to service the request, and any state is held in the client. The server can be stateful, this constraint merely requires that server-side state be addressable by URL as a resource.
  12. 12.    simplifies server improves scalability improves reliability
  13. 13. Cacheable      Clients are able to cache responses. Responses must, implicitly or explicitly, define themselves as cacheable or not. reduces average latency + improves efficiency + improves scalability
  14. 14. Uniform interface A uniform interface between clients and servers simplifies and decouples the architecture.  This enables each part to evolve independently.
  15. 15. Layered system        A client cannot ordinarily tell whether it is connected directly to the end server, or to an intermediary along the way. Layers providing load balancing, security or shared caching can be added or removed very easily this way. simplifies clients + shared caching + improves scalability + legacy encapsulation + load balancing
  16. 16. Code on demand (optional)  Servers are able temporarily to extend or customize the functionality of a client by the transfer of executable code. Examples of this may include compiled components such as Java applets and client-side scripts such as JavaScript.
  17. 17. Advantages   With RESTful design, Web services can be seen as simply a means of publishing information, components and processes to make them accessible to other users and machine processes. REST requires less client-side software than do other approaches, because a single, standard browser can access any application and data resource.
  18. 18.       Offers possibilities for thin client development as less client code is required. Does not require explicit resource discovery mechanism due to hyperlinking. Scalable architecture compared with those that require stateful servers. Caching promotes network efficiency and fast response times. Software versioning benefits including support of document type evolution such as HTML and XML without impacting backward or forward compatibility. Resource extensibility, allowing support for new content types without impacting existing and legacy content types.
  19. 19. Disadvantages     HTTP as a uniform interface presents technical challenges for real time asynchronous events to a thin client or browser based application. Managing URI Namespace can be cumbersome. Lacks supporting software tools Can impact network performance by encouraging more frequent client-server requests and responses.
  20. 20. some major brands using REST

×