![Page 1: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/1.jpg)
Gustaf Nilsson Kotte
Combining HTML Hypermedia APIs and Adaptive Web Design
![Page 2: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/2.jpg)
![Page 3: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/3.jpg)
![Page 4: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/4.jpg)
Platform fragmentation
HTML Hypermedia APIs
Capability fragmentation
Progressive Enhancement
The API and the web can be the same thing!
![Page 5: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/5.jpg)
![Page 6: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/6.jpg)
![Page 7: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/7.jpg)
![Page 8: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/8.jpg)
![Page 9: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/9.jpg)
![Page 10: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/10.jpg)
![Page 11: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/11.jpg)
![Page 12: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/12.jpg)
![Page 13: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/13.jpg)
Hypermedia controls, i.e. <a>, <link>, <form>
Rich semantics, i.e. <ul>, <ol>, <dl>
Enhance using micro format style
Already standardized
Everybody knows it
Good tooling support
For native apps: embed in a ”web view”
![Page 14: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/14.jpg)
Q: Only GET/POST?
A: No problem for Fielding.
Q: What about size?
A: Gzip is your friend.
Q: What about parsing?
A: Use existing libraries for your platform.
![Page 15: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/15.jpg)
<div class="message-block"><div id="messages"><ul class="single">
<li><span class="message-text">Message text</span><span class="single">@</span><a rel="message" href="..." title="message"><span class="date-time">2012-01-01</span>
</a><span class="single">by</span><a rel="user" href="..." title="A title"><span class="user-text">User text</span>
</a></li><!-- ... ->
</ul></div>
</div>
<!–- Example, to get all user-texts: $("#messages .user-text") -->
![Page 16: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/16.jpg)
”Building Hypermedia APIs with HTML5
and Node”, Mike Amundsen
”Designing Hypermedia APIs”, Steve Klabnik
![Page 17: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/17.jpg)
![Page 18: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/18.jpg)
Most consumers will be in the low-to-middle priced markets
![Page 19: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/19.jpg)
Three iOS devices – 40%
3112 other devices– 60%, up to 3% each
![Page 20: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/20.jpg)
Now: Screen size fragmentation.
Future: ?
![Page 21: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/21.jpg)
![Page 22: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/22.jpg)
![Page 23: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/23.jpg)
![Page 24: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/24.jpg)
![Page 25: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/25.jpg)
![Page 26: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/26.jpg)
![Page 27: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/27.jpg)
![Page 28: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/28.jpg)
Mobile first
Content first
Use-cases (or stories) first
(What makes you unique?)
![Page 29: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/29.jpg)
Responsive Web Design
• Media queries
• Fluid layouts
![Page 30: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/30.jpg)
Delayed and conditionally loaded content
Bundle AJAX requests (think hard about caching though)
![Page 31: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/31.jpg)
![Page 32: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/32.jpg)
Connection speed hint using the HTML5 Navigation Timing API (?)
![Page 33: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/33.jpg)
”Adaptive Web Design - Crafting Rich Experiences with Progressive Enhancement”, Aaron Gustafson
“Progressive Enhancement 2.0”, Nicolas Zakas
“Resource-Oriented Client Architecture”, http://roca-style.org
![Page 34: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/34.jpg)
![Page 35: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/35.jpg)
<div class="message-block"><div id="messages"><ul class="single">
<li><span class="message-text">Message text</span><span class="single">@</span><a rel="message" href="..." title="message"><span class="date-time">2012-01-01</span>
</a><span class="single">by</span><a rel="user" href="..." title="A title"><span class="user-text">User text</span>
</a></li><!-- ... ->
</ul></div>
</div>
![Page 36: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/36.jpg)
<div class="message-block"><div id="messages"><ul class="single">
<li><span class="message-text">Message text</span><span class="single">@</span><a rel="message" href="..." title="message"><span class="date-time">2012-01-01</span>
</a><span class="single">by</span><a rel="user" href="..." title="A title"><span class="user-text">User text</span>
</a></li><!-- ... ->
</ul></div>
</div>
![Page 37: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/37.jpg)
Separate API and web on URI level
Follow the HTTP specification
Web menu with server-side include
… (?)
![Page 38: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/38.jpg)
Parallel implementation
![Page 39: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/39.jpg)
![Page 40: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/40.jpg)
![Page 41: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/41.jpg)
Platform fragmentation
HTML Hypermedia APIs
Capability fragmentation
Progressive Enhancement
The API and the web can be the same thing!
![Page 42: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/42.jpg)
![Page 43: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/43.jpg)
Why supporting so many different type of platforms/browsers?
Data sent with <form> POSTs is flat – conventions needed?
How about mapping between <form> fields and native forms?
How to integrate ”web views” in a good way?
What about offline support for these views?
How does this relate to testing?
How does this relate to design?
How does this relate to ideas in Lean Startup?
![Page 44: Surviving the Zombie Apocalpyse of Connected Devices](https://reader036.vdocuments.mx/reader036/viewer/2022081400/554f37efb4c905471e8b47a7/html5/thumbnails/44.jpg)