8. The Web | a hypermedia story
past, present, future.
9. Hypertext is text that branches and
allows choices on an interactive screen.
It’s text chunks connected by links which
offer the reader different pathways.
—Ted Nelson, Dream Machines (1974)
23. REST | REpresentational State Transfer
An architectural style
for large hypermedia systems
(such as the Web).
Why is the Web successful?
constraints
24. REST | Uniform interface constraints
Identification of resources
Manipulation through representations
Self-descriptive messages
Hypermedia as the engine
26. /books/35
REST | Identification of resources
/users/34/books/borrowed
I can get the list of borrowed books.
I can add something to it.
Identify resources, not actions.
27. REST | Uniform interface constraints
Identification of resources
Manipulation through representations
Self-descriptive messages
Hypermedia as the engine
30. REST | Manipulation of resources
Don’t create an API.
There is already one:
it’s called HTTP.
(And it’s more widely used
than yours will ever be.)
31. REST | Uniform interface constraints
Identification of resources
Manipulation through representations
Self-descriptive messages
Hypermedia as the engine
32. REST | Self-descriptive messages
POST /index.php?action=showBook&id=35
POST /index.php?action=borrowBook&id=35
What happens?
34. REST | Self-descriptive messages
POST /users/34/books/borrowed
Use it.
No surprises.
HTTP has a uniform interface.
GET /users/34/books/borrowed
DELETE /users/34/books/borrowed
35. REST | Uniform interface constraints
Identification of resources
Manipulation through representations
Self-descriptive messages
Hypermedia as the engine
40. REST | Hypermedia as the engine
For humans and machines.
Don’t make us read your manual.
Make your information actionable.
Hypermedia should be the engine
of your application.
Representations should contain
the links to next steps.
41. REST | Fielding’s definition of hypermedia
Hypertext is the simultaneous presentation
of information and controls such that
the information becomes the affordance
through which the user (or automaton)
obtains choices and selects actions.
42. REST | Fielding’s definition of hypermedia
the simultaneous presentation
of information and controls
HTML or JSON
with links
43. REST | Fielding’s definition of hypermedia
the user (or automaton)
obtains choices and selects actions.
you choose
the next step
(you don’t have
to create it yourself)
52. URLs give meaning to concepts | RDF
<http://en.wikipedia.org/wiki/Tim_Berners-Lee>
<http://en.wiktionary.org/wiki/knows>
<http://en.wikipedia.org/wiki/Ted_Nelson>.
53. Embed meaning in HTML | RDF
<div id="book" itemtype="http://schema.org/Book">
<span itemprop="name">The Catcher in the Rye</span> –
by <a itemprop="author" href="#salinger">J.D. Salinger</a>
</div>
54. Embed meaning in HTML | RDF
<div id="book" itemtype="http://schema.org/Book">
<span itemprop="name">The Catcher in the Rye</span> –
by <a itemprop="author" href="#salinger">J.D. Salinger</a>
</div>
Your page can be
read by people
and understood
by machines
55. The Web | a hypermedia story
past, present, future.