This presentation aimed to explain what is REST and why it is commonly misunderstood. It focuses on describing REST from scientific point of view, based on Roy`s Fielding dissertation.
35. Uniform Interface
Resources
Don`t use database schema as a basis for
Web API for couple of reasons
API clients care about application semantics not database
schema, which is different thing
Changes to the database schema become impossible
39. Uniform Interface
Manipulation of resources through representations
A representation is a sequence of bytes, plus
representation metadata to describe those bytes.
Representation captures the state of resource.
40. Uniform Interface
Manipulation of resources through representations
Can be any sequence of bytes
Resource can have multiple representations
Content negotiation is needed
41. Uniform Interface
Manipulation of resources through representations
Do I violate REST if I pick HTML as
representation format?
NO YOU DON`T
50. Uniform Interface
HATEOAS
Decoupling between client and server
Resilience to API changes
Enhanced usability (no hardcode and doc issues)
Why hypermedia is important for Web APIs?
55. REST Flavor
“REST is software design on the scale of decades:
every detail is intended to promote software longevity
and independent evolution. Many of the constraints
are directly opposed to short-term efficiency”
- Roy Fielding
56. HTTP only?
REST is not bound to HTTP
Other implementations are: CoAP, Waka
58. Richardson Maturity Model
Don`t reinvent the wheel, stick with capabilities of
application protocol of your choice (HTTP mostly)
HTTP Verbs, Status Codes, Headers
59. REST Religion
REST is not a religion! Treat it as a reference
network architecture of the Web