SlideShare a Scribd company logo
REST
representational state transfer
David Krmpotić
WHAT IS IT?
Architectural style that builds on
the existing protocols of the web.
Roy Fielding
http://app.com/pics/show/1
http://app.com/pics/destroy/1
RESTful style knocks
the verbs out of the urls
http://app.com/pics/1
What remains:
a (unique) resource identifier
an “abstract thing” that lives in the cloud
a.k.a. ”the intended conceptual target of a
hypertext reference” :]
a representation of the resource
(you can never access the resource itself, only various representations of it)
http:// GET app.com/pics/1
We have nouns (resources),
but what happened to the verbs?
http:// DELETE app.com/pics/1
 they moved from the URL to the HTTP request method !
IS THIS A
GOOD THING?
simplicity and abstraction
GET
PUT
POST
DELETE
Yes!
} uniform
interface
REST is about resources
Nouns
URIs
(unconstrained)
Verbs
GET, PUT, POST, DELETE
(constrained)
Content Types
HTML, JPEG, XML etc.
(constrained)
GET /pics/1
Accept: JPEG
or GET /pics/1.jpg
Requesting different
resource representations
GET /pics/1
Accept: XML
or GET /pics/1.xml
<picture>
<place>Axe Lake</place>
<size>1024x768</size>
<date>2008-05-01</date>
</picture>
GET /people
Accept: XML
Plural resources
GET /people/1
Accept: JPEG
<people>
<person>
<id>1</id>
<name>Ann</name>
<age>28</age>
</person>
<person>
<id>2</id>
<name>Bruce</name>
<age>32</age>
</person>
...
</people>
It relies on the following standards though:
HTTP
URL
XML/HTML/GIF/JPEG/etc
(resource representations)
text/xml, text/html, image/gif, image/jpeg, etc.
(content types)
remember
REST is not a standard!
REST in
Before enlightenment
http://app.com/clients/show/1
After
controller action
http://app.com/clients/1
+ HTTP method
controllermap.resources
action
map.resources
action where the request lands is shown with gray background
edit and new are helper actions for showing the form
Representational State Transfer (REST)
We also get a few named routes:
clients_path
new_client_path
edit_client_path(id)
client_path(id)
Custom actions
GET /tasks/completed PUT /tasks/12/complete
you should add custom actions carefully and never more than two or three
Responder block
takes care of different resource representations
Nested resources (in Rails 2)
http://adam.blog.heroku.com/past/2007/12/20/nested_resources_in_rails_2/
/events/1/tickets
A resource is not always a one-to-one
mapping to a Rails model or database table.
Sometimes a resource is "virtual" and exists in
your domain vocabulary and application logic,
but is not backed by a database table. [2]
GOOD TO KNOW
models != resources
To create a website that is:
• easy to use
• easy to maintain
• easy to cache
• easy to scale
Why use REST?
Thank you!
Resources (n.p.i.)
[1] Roy Fielding’s dissertation (2000)
www.ics.uci.edu/~fielding/pubs/dissertation/top.htm
[2] REST 101
www.softiesonrails.com/search?q=rest+101
[3] A Brief Introduction to REST
www.infoq.com/articles/rest-introduction
[4] How I Explained REST to My Wife
tomayko.com/writings/rest-to-my-wife

More Related Content

PDF
REST - Representational State Transfer
PPT
The Rest Architectural Style
PDF
REST - Representational state transfer
PPTX
RESTful Architecture
PPTX
REST & RESTful Web Services
PDF
HATEOAS: The Confusing Bit from REST
PDF
Representational State Transfer (REST) and HATEOAS
PPTX
Rest & RESTful WebServices
REST - Representational State Transfer
The Rest Architectural Style
REST - Representational state transfer
RESTful Architecture
REST & RESTful Web Services
HATEOAS: The Confusing Bit from REST
Representational State Transfer (REST) and HATEOAS
Rest & RESTful WebServices

What's hot (20)

PPTX
Representational State Transfer
PPT
Introduction to the Web API
PPTX
PDF
ReST (Representational State Transfer) Explained
PDF
Rest web services
ODP
The Internet as Web Services: introduction to ReST
KEY
Rest and the hypermedia constraint
PPTX
REST API Design
ODP
RESTful Web Services
PPTX
JSON and REST
PPTX
The glory of REST in Java: Spring HATEOAS, RAML, Temenos IRIS
PPTX
Restful webservice
PPT
RESTful services
PPTX
Overview of RESTful web services
PPTX
Rest presentation
PPT
Understanding REST
PDF
Representational State Transfer (REST)
PPTX
Overview of Rest Service and ASP.NET WEB API
PPT
Introduction to REST and the Restlet Framework
PDF
Restful web services by Sreeni Inturi
Representational State Transfer
Introduction to the Web API
ReST (Representational State Transfer) Explained
Rest web services
The Internet as Web Services: introduction to ReST
Rest and the hypermedia constraint
REST API Design
RESTful Web Services
JSON and REST
The glory of REST in Java: Spring HATEOAS, RAML, Temenos IRIS
Restful webservice
RESTful services
Overview of RESTful web services
Rest presentation
Understanding REST
Representational State Transfer (REST)
Overview of Rest Service and ASP.NET WEB API
Introduction to REST and the Restlet Framework
Restful web services by Sreeni Inturi
Ad

Viewers also liked (18)

PDF
Understanding SOAP and REST basics and differences
PPT
2 dtd - validating xml documents
PPT
XML and DTD
PPT
REST Presentation
DOC
Lampiran unit root test
PDF
Connect.Tech- Enhancing Your Workflow With Xcode Source Editor Extensions
PDF
A Hypervisor IPS based on Hardware Assisted Virtualization Technology
PDF
Purchasing power parity a unit root, cointegration and var analysis in emergi...
PPTX
How to create a jQuery Modal Window
PDF
Design patterns
DOCX
EQUITY MARKET INTEGRATION IN SELECTED MARKETS: EVIDENCE FROM UNIT ROOT AND CO...
PDF
1.Buffer Overflows
PPTX
Creational pattern
PPTX
Intrinsic Encounter - Cognitive Load Theory
PDF
Web design trends for 2010
PDF
Minimize Cognitive Load + Maximize Conversions : 10 Tips
PDF
Buffer overflow and other software vulnerabilities: theory and practice of pr...
PPT
Lecture 13
Understanding SOAP and REST basics and differences
2 dtd - validating xml documents
XML and DTD
REST Presentation
Lampiran unit root test
Connect.Tech- Enhancing Your Workflow With Xcode Source Editor Extensions
A Hypervisor IPS based on Hardware Assisted Virtualization Technology
Purchasing power parity a unit root, cointegration and var analysis in emergi...
How to create a jQuery Modal Window
Design patterns
EQUITY MARKET INTEGRATION IN SELECTED MARKETS: EVIDENCE FROM UNIT ROOT AND CO...
1.Buffer Overflows
Creational pattern
Intrinsic Encounter - Cognitive Load Theory
Web design trends for 2010
Minimize Cognitive Load + Maximize Conversions : 10 Tips
Buffer overflow and other software vulnerabilities: theory and practice of pr...
Lecture 13
Ad

Similar to Representational State Transfer (REST) (20)

PDF
[2015/2016] The REST architectural style
PDF
REST Basics
PDF
PDF
-overview of res tful architecture-2
PPTX
RESTful Web Services
PPTX
Overview of REST - Raihan Ullah
PPTX
Дмитрий Красун: Сегодня вы уйдете с новым представлением о REST
PPTX
REST and RESTful Services
PPTX
RESTful services
PDF
Creating Restful Web Services with restish
PPTX
Rest surekha
PDF
What is rest. Why is it part of the Rails way?. Railsconf 2014. Javier Ramirez
PPTX
Introduction To REST
PDF
Rest Introduction (Chris Jimenez)
PPTX
RESTful APIs
PPT
emilio.ppt
PPT
emilio.ppt
PPTX
REST Architecture with use case and example
PPTX
REST Architecture with use case and example
PDF
Enterprise REST
[2015/2016] The REST architectural style
REST Basics
-overview of res tful architecture-2
RESTful Web Services
Overview of REST - Raihan Ullah
Дмитрий Красун: Сегодня вы уйдете с новым представлением о REST
REST and RESTful Services
RESTful services
Creating Restful Web Services with restish
Rest surekha
What is rest. Why is it part of the Rails way?. Railsconf 2014. Javier Ramirez
Introduction To REST
Rest Introduction (Chris Jimenez)
RESTful APIs
emilio.ppt
emilio.ppt
REST Architecture with use case and example
REST Architecture with use case and example
Enterprise REST

Recently uploaded (20)

PPT
JAVA ppt tutorial basics to learn java programming
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPT
Introduction Database Management System for Course Database
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Digital Strategies for Manufacturing Companies
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
L1 - Introduction to python Backend.pptx
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
JAVA ppt tutorial basics to learn java programming
Wondershare Filmora 15 Crack With Activation Key [2025
Introduction Database Management System for Course Database
Softaken Excel to vCard Converter Software.pdf
Odoo POS Development Services by CandidRoot Solutions
Understanding Forklifts - TECH EHS Solution
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Digital Strategies for Manufacturing Companies
ISO 45001 Occupational Health and Safety Management System
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Design an Analysis of Algorithms I-SECS-1021-03
How to Migrate SBCGlobal Email to Yahoo Easily
L1 - Introduction to python Backend.pptx
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
VVF-Customer-Presentation2025-Ver1.9.pptx
Which alternative to Crystal Reports is best for small or large businesses.pdf
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)

Representational State Transfer (REST)