progressive enhancement 2.0 (conference agnostic)

125
Progressive Enhancement 2.0 Because the Web isn't Print Nicholas C. Zakas Presentation Architect, Yahoo!

Upload: nicholas-zakas

Post on 15-Jan-2015

15.950 views

Category:

Technology


1 download

DESCRIPTION

In the beginning, progressive enhancement was simple: HTML layered with CSS layered with JavaScript. That worked fine when there were two browsers, but in today's world of multiple devices and multiple browsers, it's time for a progressive enhancement reboot. At the core is the understanding that the web is not print - the same rules don't apply. As developers and consumers we've been fooled into thinking about print paradigms for too long. In this talk, you'll learn just how different the web is and how the evolution of progressive enhancement can lead to better user experiences as well as happier developers and users.This deck is a conference-agnostic one, suitable to be shown anywhere without site-specific jokes!

TRANSCRIPT

Page 1: Progressive Enhancement 2.0 (Conference Agnostic)

Progressive Enhancement 2.0Because the Web isn't Print

Nicholas C. ZakasPresentation Architect, Yahoo!

Page 2: Progressive Enhancement 2.0 (Conference Agnostic)

Who's this guy?

Presentation Architect

Contributor,Creator of YUI Test

Author Lead Author Contributor Lead Author

Page 3: Progressive Enhancement 2.0 (Conference Agnostic)

@slicknet

Page 4: Progressive Enhancement 2.0 (Conference Agnostic)

A Brief History ofWeb Development

Page 5: Progressive Enhancement 2.0 (Conference Agnostic)
Page 6: Progressive Enhancement 2.0 (Conference Agnostic)

http://www.flickr.com/photos/marc_smith/447183492/http://www.flickr.com/photos/marc_smith/447183492/

Page 7: Progressive Enhancement 2.0 (Conference Agnostic)

1993

Page 8: Progressive Enhancement 2.0 (Conference Agnostic)
Page 9: Progressive Enhancement 2.0 (Conference Agnostic)

1994

Page 10: Progressive Enhancement 2.0 (Conference Agnostic)

1995

Page 11: Progressive Enhancement 2.0 (Conference Agnostic)

1996

Page 12: Progressive Enhancement 2.0 (Conference Agnostic)

Nowin

color!

Nowin

color!

Page 13: Progressive Enhancement 2.0 (Conference Agnostic)
Page 14: Progressive Enhancement 2.0 (Conference Agnostic)
Page 15: Progressive Enhancement 2.0 (Conference Agnostic)
Page 16: Progressive Enhancement 2.0 (Conference Agnostic)

1995

Page 17: Progressive Enhancement 2.0 (Conference Agnostic)

1996

Alsoin

color!

Alsoin

color!

Page 18: Progressive Enhancement 2.0 (Conference Agnostic)
Page 19: Progressive Enhancement 2.0 (Conference Agnostic)
Page 20: Progressive Enhancement 2.0 (Conference Agnostic)
Page 21: Progressive Enhancement 2.0 (Conference Agnostic)

"Anyone who slaps a 'this page is best viewed with Browser X' label on a Web page appears to be yearning for the bad old days, before the Web, when you had very little chance of reading a document written on another computer, another word processor, or another network."

Tim Berners-Lee, 1996

Page 22: Progressive Enhancement 2.0 (Conference Agnostic)

Graceful Degradation

Page 23: Progressive Enhancement 2.0 (Conference Agnostic)

"Property of Bri ifzombies attack."

"Property of Bri ifzombies attack."

Page 24: Progressive Enhancement 2.0 (Conference Agnostic)

http://www.digital-web.com/articles/fluid_thinking/

Page 25: Progressive Enhancement 2.0 (Conference Agnostic)

<noscript>

Page 26: Progressive Enhancement 2.0 (Conference Agnostic)

<noscript>Your browser doesn't support JavaScript. Sucks to be you.

Bye.</noscript>

Page 27: Progressive Enhancement 2.0 (Conference Agnostic)
Page 28: Progressive Enhancement 2.0 (Conference Agnostic)

Progressive Enhancement

Page 29: Progressive Enhancement 2.0 (Conference Agnostic)

http://www.alistapart.com/articles/understandingprogressiveenhancement/

Page 30: Progressive Enhancement 2.0 (Conference Agnostic)
Page 31: Progressive Enhancement 2.0 (Conference Agnostic)
Page 32: Progressive Enhancement 2.0 (Conference Agnostic)

http://www.alistapart.com/articles/understandingprogressiveenhancement/

Page 33: Progressive Enhancement 2.0 (Conference Agnostic)

http://www.flickr.com/photos/midiman/336647596/http://www.flickr.com/photos/midiman/336647596/

"An escalator can never break;it can only become stairs."

Mitch Hedberg, Comedian

Page 34: Progressive Enhancement 2.0 (Conference Agnostic)
Page 35: Progressive Enhancement 2.0 (Conference Agnostic)

BehaviorBehavior

PresentationPresentation

ContentContent

Page 36: Progressive Enhancement 2.0 (Conference Agnostic)

JavaScriptJavaScript

CSSCSS

HTMLHTML

Page 37: Progressive Enhancement 2.0 (Conference Agnostic)
Page 38: Progressive Enhancement 2.0 (Conference Agnostic)

JavaScriptJavaScript

CSSCSS

HTMLHTML

A-Grade

Page 39: Progressive Enhancement 2.0 (Conference Agnostic)

HTMLHTML

C-Grade

Page 40: Progressive Enhancement 2.0 (Conference Agnostic)

Progressive Enhancement 1.0

Page 41: Progressive Enhancement 2.0 (Conference Agnostic)
Page 42: Progressive Enhancement 2.0 (Conference Agnostic)

We're having some problems

Page 43: Progressive Enhancement 2.0 (Conference Agnostic)

Development takes too long

http://www.flickr.com/photos/athomeinscottsdale/4507847940/

Page 44: Progressive Enhancement 2.0 (Conference Agnostic)

Too many bugs

http://www.flickr.com/photos/kaibara/4632384645/

Page 45: Progressive Enhancement 2.0 (Conference Agnostic)

Our pages are slow

http://www.flickr.com/photos/drb62/4990651560/

Page 46: Progressive Enhancement 2.0 (Conference Agnostic)
Page 47: Progressive Enhancement 2.0 (Conference Agnostic)

Why?

Page 48: Progressive Enhancement 2.0 (Conference Agnostic)
Page 49: Progressive Enhancement 2.0 (Conference Agnostic)

We got confused

Page 50: Progressive Enhancement 2.0 (Conference Agnostic)

Web page : ?

Page 51: Progressive Enhancement 2.0 (Conference Agnostic)

Web sites look like print

Page 52: Progressive Enhancement 2.0 (Conference Agnostic)

Web page : Printed page

Page 53: Progressive Enhancement 2.0 (Conference Agnostic)

1) WEB PAGE : PRINTED PAGE ::

(a) dairy : diary (b) spider : author (c) web browser : book (d) digital photo : print photo (e) cell phone: text message

Page 54: Progressive Enhancement 2.0 (Conference Agnostic)

http://www.flickr.com/photos/chrisschroeder/4096627359/

Every printed book is exactly the same

Page 55: Progressive Enhancement 2.0 (Conference Agnostic)

http://www.flickr.com/photos/joanna8555/5554285729/

We became obsessed with identical experiencesacross all browsers

Page 56: Progressive Enhancement 2.0 (Conference Agnostic)

http://www.flickr.com/photos/denisdervisevic/5327974794/

People got angry if you suggested otherwise

Page 57: Progressive Enhancement 2.0 (Conference Agnostic)

Quality?

Page 58: Progressive Enhancement 2.0 (Conference Agnostic)

Professional?

Page 59: Progressive Enhancement 2.0 (Conference Agnostic)

Consistency?

Page 60: Progressive Enhancement 2.0 (Conference Agnostic)

Unity of messaging combined with brand identification while

setting user expectations appropriately?

Page 61: Progressive Enhancement 2.0 (Conference Agnostic)

http://xark.typepad.com/my_weblog/2008/01/bullshit-still.html

Page 62: Progressive Enhancement 2.0 (Conference Agnostic)

1) WEB PAGE : PRINTED PAGE ::

(a) dairy : diary (b) spider : author (c) web browser : book (d) digital photo : print photo (e) cell phone: text messageWRONG

Page 63: Progressive Enhancement 2.0 (Conference Agnostic)
Page 64: Progressive Enhancement 2.0 (Conference Agnostic)

http://www.flickr.com/photos/ramdac/377087239/

Page 65: Progressive Enhancement 2.0 (Conference Agnostic)
Page 66: Progressive Enhancement 2.0 (Conference Agnostic)

We started the analogy in the wrong spot

Page 67: Progressive Enhancement 2.0 (Conference Agnostic)

Web page : ?

Page 68: Progressive Enhancement 2.0 (Conference Agnostic)

Web page : Printed page

WRONG

Page 69: Progressive Enhancement 2.0 (Conference Agnostic)

Web browser : Web page

Page 70: Progressive Enhancement 2.0 (Conference Agnostic)

1) WEB BROWSER : WEB PAGE ::

(a) telephone : call (b) computer : email (c) printed book : printed page (d) television : television show (e) mailbox : letter

Page 71: Progressive Enhancement 2.0 (Conference Agnostic)
Page 72: Progressive Enhancement 2.0 (Conference Agnostic)
Page 73: Progressive Enhancement 2.0 (Conference Agnostic)

Old browsers are like black & white TVs

http://www.flickr.com/photos/stevestein1982/4047834684/

Page 74: Progressive Enhancement 2.0 (Conference Agnostic)

New browsers are like HD TVs

http://www.flickr.com/photos/lge/3988988400/

Page 75: Progressive Enhancement 2.0 (Conference Agnostic)

TV already solved this problem

http://www.flickr.com/photos/navdeepraj/504596529/

Page 76: Progressive Enhancement 2.0 (Conference Agnostic)

This would be sillyYet this is what web developers have been doing

http://www.flickr.com/photos/navdeepraj/504596529/

Page 77: Progressive Enhancement 2.0 (Conference Agnostic)

Do web sites need to look exactly the same in every browser?

Page 78: Progressive Enhancement 2.0 (Conference Agnostic)

http://dowebsitesneedtolookexactlythesameineverybrowser.com/

Page 79: Progressive Enhancement 2.0 (Conference Agnostic)

Your site SHOULD look different in different browsers

Page 80: Progressive Enhancement 2.0 (Conference Agnostic)

Give users an incentive to upgrade

Page 81: Progressive Enhancement 2.0 (Conference Agnostic)

JavaScriptJavaScript

CSSCSS

HTMLHTML

Progressive Enhancement 1.0

Page 82: Progressive Enhancement 2.0 (Conference Agnostic)

Progressive Enhancement 2.0

Base JSBase JSBase JSBase JSBase JSBase JS

OMG CSSOMG CSS OMG JSOMG JS

Nice CSSNice CSS Nice JSNice JS

Base CSSBase CSS Base JSBase JS

HTMLHTML

Page 83: Progressive Enhancement 2.0 (Conference Agnostic)

Chrome

Base JSBase JSBase JSBase JSBase JSBase JS

Base JSBase JSBase JSBase JSBase JSBase JSOMG CSSOMG CSS OMG JSOMG JS

Base JSBase JSBase JSBase JSBase JSBase JSNice CSSNice CSS Nice JSNice JS

Base CSSBase CSS Base JSBase JS

HTMLHTML

Page 84: Progressive Enhancement 2.0 (Conference Agnostic)

Firefox

Base JSBase JSBase JSBase JSBase JSBase JS

OMG JSOMG JS

Base JSBase JSBase JSBase JSBase JSBase JSNice CSSNice CSS Nice JSNice JS

Base CSSBase CSS Base JSBase JS

HTMLHTML

Page 85: Progressive Enhancement 2.0 (Conference Agnostic)

Internet Explorer 9

Base JSBase JSBase JSBase JSBase JSBase JS

Base JSBase JSBase JSBase JSBase JSBase JSNice CSSNice CSS Nice JSNice JS

Base CSSBase CSS Base JSBase JS

HTMLHTML

Page 86: Progressive Enhancement 2.0 (Conference Agnostic)

Internet Explorer 6

Base JSBase JSBase JSBase JSBase JSBase JSBase CSSBase CSS Base JSBase JS

HTMLHTML

Page 87: Progressive Enhancement 2.0 (Conference Agnostic)

Netscape 4

HTMLHTML

Page 88: Progressive Enhancement 2.0 (Conference Agnostic)

New Browser Capabilities

Rounded CornersDrop ShadowsGradientsTransitionsTransformsMultiple Background Images

Rounded CornersDrop ShadowsGradientsTransitionsTransformsMultiple Background Images

Drag and DropGeolocationCross-Domain AjaxCross-Domain MessagingClient-Side Data StorageCanvas/WebGL

Drag and DropGeolocationCross-Domain AjaxCross-Domain MessagingClient-Side Data StorageCanvas/WebGL

Page 89: Progressive Enhancement 2.0 (Conference Agnostic)

The best possible experiencegiven the device capabilities

Page 90: Progressive Enhancement 2.0 (Conference Agnostic)

Awesome!Awesome!

OKOK

OKOK

Bad!Bad!

Effort

Valu

e

Page 91: Progressive Enhancement 2.0 (Conference Agnostic)

11

8

81

IE6IE7Others

Browser Marketshare

Source: http://marketshare.hitslink.com/browser-market-share.aspx?qprid=2

Page 92: Progressive Enhancement 2.0 (Conference Agnostic)

40

60

IE6 & IE7Others

Development Time Spent

Source: Me

Page 93: Progressive Enhancement 2.0 (Conference Agnostic)

Used with permission. Copyright 2008 BoyShapedBox.http://www.flickr.com/photos/boyshapedbox/2282655473/

Page 94: Progressive Enhancement 2.0 (Conference Agnostic)

http://www.flickr.com/photos/myphotoshopbrushes/3242490894/

Page 95: Progressive Enhancement 2.0 (Conference Agnostic)

Rounded CornersDrop ShadowsGradients

Rounded CornersDrop ShadowsGradients

Only with CSSOnly with CSS

Page 96: Progressive Enhancement 2.0 (Conference Agnostic)

Advanced scripting andbehaviorAdvanced scripting andbehavior

Only with nativeAPIs

Only with nativeAPIs

Page 97: Progressive Enhancement 2.0 (Conference Agnostic)

Trying to make older browsers do things they were never meant to do

Too many bugs

Slow pages

Long development time

Page 98: Progressive Enhancement 2.0 (Conference Agnostic)

Older browsers often need*a lot*

more code to do the same thing

Page 99: Progressive Enhancement 2.0 (Conference Agnostic)

Before

<div class="y-pa-app pa-app-view" id="{$id}-app-view"><div class="pa-app-chrome-topshadow pa-app-chrome-border-color y-pa-ln-open-dk">

<div class="pa-app-chrome-leftcorner y-fp-pg-controls"></div><div class="pa-app-chrome-rightcorner y-fp-pg-controls"></div>

</div><div class="pa-app-chrome-rightshadow">

<div class="pa-app-chrome-content pa-app-chrome-border-color y-pa-bg-open y-pa-ln-open-dk"><div class="pa-app-chrome-hd">

<ul class="pa-nav"><li>

<a role="button" class="pa-close y-fp-pg-controls-nt hide-textindent" href="#close" {$closeBeacon2}><!!>STR.PA.EXPANDED.CLOSE</!!></a>

</li></ul>

</div><div class="pa-app-chrome-bd">

<div class="pa-mod-ctr" id="{$id}-mod-ctr" style="visibility: visible;"></div><div id="{$id}-module-loading-msg" class="y-pa-ln-open-dk pa-module-loading-msg"></div><a role="button" class="pa-close hide-offscreen" href="#close"

{$closeBeacon2}><!!>STR.PA.EXPANDED.CLOSE</!!></a></div>

</div></div><div class="pa-app-chrome-bottomshadow y-fp-pg-grad pa-app-chrome-border-color y-pa-ln-open-dk">

<div class="pa-app-chrome-leftcorner y-fp-pg-controls"></div><div class="pa-app-chrome-rightcorner y-fp-pg-controls"></div>

</div></div>

1467 bytes1467 bytes

Page 100: Progressive Enhancement 2.0 (Conference Agnostic)

After

<div class="pa-app" id="{$id}-app"><button class="do-app-close y-fp-pg-controls-nt hide-textindent" {$closeBeacon2}><!!>STR.PA.EXPANDED.CLOSE</!!></button><div class="pa-app-bd">

<div id="{$id}-mod" class="pa-app-mod"></div><div id="{$id}-module-loading-msg" class="y-pa-ln-open-dk pa-module-loading-msg"></div>

</div> <div class="pa-app-cort"></div><div class="pa-app-corb"></div><button class="do-app-close y-fp-pg-controls-nt hide-textindent" {$closeBeacon2}><!!>STR.PA.EXPANDED.CLOSE</!!></button>

</div>

566 bytes566 bytes

Page 101: Progressive Enhancement 2.0 (Conference Agnostic)

Less code=

Faster

Page 102: Progressive Enhancement 2.0 (Conference Agnostic)

Won't people notice?

Page 103: Progressive Enhancement 2.0 (Conference Agnostic)

Crying baby! Oh nos!

http://www.flickr.com/photos/tudor/318123668/

Page 104: Progressive Enhancement 2.0 (Conference Agnostic)

What did you see?

Page 105: Progressive Enhancement 2.0 (Conference Agnostic)

Crying baby! Oh nos!

http://www.flickr.com/photos/tudor/318123668/

Page 106: Progressive Enhancement 2.0 (Conference Agnostic)

Crying baby! Oh nos!

http://www.flickr.com/photos/tudor/318123668/

Page 107: Progressive Enhancement 2.0 (Conference Agnostic)

Your users only use one browser

Page 108: Progressive Enhancement 2.0 (Conference Agnostic)

@slicknetsmom@slicknetsmom

Page 109: Progressive Enhancement 2.0 (Conference Agnostic)

@slicknetsmom@slicknetsmom

Page 110: Progressive Enhancement 2.0 (Conference Agnostic)

You are not alone

Page 111: Progressive Enhancement 2.0 (Conference Agnostic)
Page 112: Progressive Enhancement 2.0 (Conference Agnostic)
Page 113: Progressive Enhancement 2.0 (Conference Agnostic)
Page 114: Progressive Enhancement 2.0 (Conference Agnostic)
Page 115: Progressive Enhancement 2.0 (Conference Agnostic)
Page 116: Progressive Enhancement 2.0 (Conference Agnostic)
Page 117: Progressive Enhancement 2.0 (Conference Agnostic)

Summary

Page 118: Progressive Enhancement 2.0 (Conference Agnostic)

1) WEB BROWSER : WEB PAGE ::

(a) telephone : call (b) computer : email (c) printed book : printed page (d) television : television show (e) mailbox : letter

Page 119: Progressive Enhancement 2.0 (Conference Agnostic)

JavaScriptJavaScript

CSSCSS

HTMLHTML

Progressive Enhancement 1.0

Page 120: Progressive Enhancement 2.0 (Conference Agnostic)

Progressive Enhancement 2.0

Base JSBase JSBase JSBase JSBase JSBase JS

OMG CSSOMG CSS OMG JSOMG JS

Nice CSSNice CSS Nice JSNice JS

Base CSSBase CSS Base JSBase JS

HTMLHTML

Page 121: Progressive Enhancement 2.0 (Conference Agnostic)

http://www.flickr.com/photos/navdeepraj/504596529/

Page 122: Progressive Enhancement 2.0 (Conference Agnostic)

Don't be horrible

Page 123: Progressive Enhancement 2.0 (Conference Agnostic)

Do be awesome

Page 124: Progressive Enhancement 2.0 (Conference Agnostic)

The End

Page 125: Progressive Enhancement 2.0 (Conference Agnostic)

Etcetera• My blog: www.nczonline.net• Twitter: @slicknet• These Slides: slideshare.net/nzakas