Gustaf Nilsson Kotte / @gustaf_nk
Working nicely together!
HTML Hypermedia API + Adaptive Web Design
http://martinfowler.com/articles/richardsonMaturityModel.html
You do stuff by reading pages
and then either
follow links or submit forms.
— Jon Moore
JSON is ok :)
Also, hypermedia is a bit harder to consume in general
<li class="h-item">
<div class="p-name"><%= item.name %></div>
<div class="p-status"><%= item.status %></div>
<div class="p-description"><%= item.description %></div>
<div class="p-forms">
...
</div>
<div class="p-links">
...
</div>
</li>
<div class="p-forms">
<form data-rel="move backlog" action="/items/backlog" method="POST">
<input name="id" type="hidden" value="4">
<input title="submit" type="submit" value="Move to backlog">
</form>
<form data-rel="move verify next" action="/items/verify" method="POST">
<input name="id" type="hidden" value="4">
<input title="submit" type="submit" value="Move to verify">
</form>
</div>
HTML Hypermedia APIs ∩ Mobile first
Responsive web design
Feature detection
Device APIs
Performance
Conditional loading
Content strategy
Touch
Platform optimization
Ergonomics
...
http://bradfrostweb.com/blog/mobile/beyond-media-queries-anatomy-of-an-adaptive-web-design
HTML Hypermedia APIs ❤ Mobile First
Mobile First ❤ all web browsers and devices
HTML Hypermedia APIs
+
Adaptive Web Design
HTML Hypermedia APIs ❤ Mobile First
Mobile First ❤ all web browsers and devices
Gustaf Nilsson Kotte / @gustaf_nk
Code: https://github.com/gustafnk/kanban-awd-api
Demo: http://kanban-awd.herokuapp.com/ and http://kanban-api.herokuapp.com
Slides: https://github.com/gustafnk/HTML-Hypermedia-APIs-and-Adaptive-Web-Design