surviving the zombie apocalpyse of connected devices

44
Gustaf Nilsson Kotte Combining HTML Hypermedia APIs and Adaptive Web Design

Upload: gustaf-nilsson-kotte

Post on 10-May-2015

413 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Surviving the Zombie Apocalpyse of Connected Devices

Gustaf Nilsson Kotte

Combining HTML Hypermedia APIs and Adaptive Web Design

Page 2: Surviving the Zombie Apocalpyse of Connected Devices
Page 3: Surviving the Zombie Apocalpyse of Connected Devices
Page 4: Surviving the Zombie Apocalpyse of Connected Devices

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
Page 6: Surviving the Zombie Apocalpyse of Connected Devices
Page 7: Surviving the Zombie Apocalpyse of Connected Devices
Page 8: Surviving the Zombie Apocalpyse of Connected Devices
Page 9: Surviving the Zombie Apocalpyse of Connected Devices
Page 10: Surviving the Zombie Apocalpyse of Connected Devices
Page 11: Surviving the Zombie Apocalpyse of Connected Devices
Page 12: Surviving the Zombie Apocalpyse of Connected Devices
Page 13: Surviving the Zombie Apocalpyse of Connected Devices

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

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

<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

”Building Hypermedia APIs with HTML5

and Node”, Mike Amundsen

”Designing Hypermedia APIs”, Steve Klabnik

Page 17: Surviving the Zombie Apocalpyse of Connected Devices
Page 18: Surviving the Zombie Apocalpyse of Connected Devices

Most consumers will be in the low-to-middle priced markets

Page 19: Surviving the Zombie Apocalpyse of Connected Devices

Three iOS devices – 40%

3112 other devices– 60%, up to 3% each

Page 20: Surviving the Zombie Apocalpyse of Connected Devices

Now: Screen size fragmentation.

Future: ?

Page 21: Surviving the Zombie Apocalpyse of Connected Devices
Page 22: Surviving the Zombie Apocalpyse of Connected Devices
Page 23: Surviving the Zombie Apocalpyse of Connected Devices
Page 24: Surviving the Zombie Apocalpyse of Connected Devices
Page 25: Surviving the Zombie Apocalpyse of Connected Devices
Page 26: Surviving the Zombie Apocalpyse of Connected Devices
Page 27: Surviving the Zombie Apocalpyse of Connected Devices
Page 28: Surviving the Zombie Apocalpyse of Connected Devices

Mobile first

Content first

Use-cases (or stories) first

(What makes you unique?)

Page 29: Surviving the Zombie Apocalpyse of Connected Devices

Responsive Web Design

• Media queries

• Fluid layouts

Page 30: Surviving the Zombie Apocalpyse of Connected Devices

Delayed and conditionally loaded content

Bundle AJAX requests (think hard about caching though)

Page 31: Surviving the Zombie Apocalpyse of Connected Devices
Page 32: Surviving the Zombie Apocalpyse of Connected Devices

Connection speed hint using the HTML5 Navigation Timing API (?)

Page 33: Surviving the Zombie Apocalpyse of Connected Devices

”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
Page 35: Surviving the Zombie Apocalpyse of Connected Devices

<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

<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

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

Parallel implementation

Page 39: Surviving the Zombie Apocalpyse of Connected Devices
Page 40: Surviving the Zombie Apocalpyse of Connected Devices
Page 41: Surviving the Zombie Apocalpyse of Connected Devices

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
Page 43: Surviving the Zombie Apocalpyse of Connected Devices

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