61
Beyond Responsive Web Design “...let a hundred devices bloom...”

Beyond Responsive Web Design

Embed Size (px)

DESCRIPTION

Responsive Web Design, as laid out by Ethan Marcotte, is about a whole lot more than just media queries. I look at the three elements of responsive web design, statistics about mobile web browsing, and offer tips on how to best design sites for responsiveness. N.B.: Several slides are lifted wholesale from Bryan Rieger's excellent "Rethinking the Mobile Web" presentation, be sure to check it out!

Citation preview

Page 1: Beyond Responsive Web Design

Beyond Responsive Web Design“...let a hundred devices bloom...”

Page 2: Beyond Responsive Web Design

Responsive web design?

Page 3: Beyond Responsive Web Design

Responsive Web Design

One HTML file

+ multiple devices and displays______________________________

a range of custom experiences

Page 4: Beyond Responsive Web Design

Responsive Web Design

In keeping with the fundamental ideas of the Web:

Access by anyone, on any device

Separation of content and presentation

Progressive enhancement / Graceful degradation

Page 5: Beyond Responsive Web Design

“A responsive design is composed of three distinct parts:”

ETHAN MARCOTTE (@BEEP), “ON BEING RESPONSIVE”

Page 6: Beyond Responsive Web Design

1. A flexible grid.

Page 7: Beyond Responsive Web Design

Flexible / fluid grids

Break up the site’s layout into modules that can be moved and resized as needed

Size modules proportionately using ems or percentages (or both)

target ÷ context = result

Page 8: Beyond Responsive Web Design

1. A flexible grid.

2. Flexible images. Or more specifically, images that work in a flexible context.

Page 9: Beyond Responsive Web Design

Flexible / fluid images

overflow: hidden

max-width: 100%

JS solutions to load an appropriately-sized image

Page 10: Beyond Responsive Web Design

1. A flexible grid.

2. Flexible images. Or more specifically, images that work in a flexible context.

3. Media queries.

Page 11: Beyond Responsive Web Design

Media queries

Ever make a print stylesheet before?

<link rel=”stylesheet” href=”#” media=”screen” />

<link rel=”stylesheet” href=”#” media=”print” />

Page 12: Beyond Responsive Web Design

Media queriesMore in-depth rules for when styles apply

<link rel=”stylesheet” href=”#”

media=”screen and (min-device-width: 640px)” />

Can be used within a stylesheet too

@media screen and (orientation:landscape) {

#content { ... }

}

Page 13: Beyond Responsive Web Design

Media queries

height

width

device-height

device-width

orientation

aspect-ratio

device-aspect-ratio

color

color-index

monochrome

resolution

scan

grid

Page 14: Beyond Responsive Web Design

“Responsive” redesigns

Page 15: Beyond Responsive Web Design

COLLY.COMDESKTOP > NARROW > MOBILE

Page 16: Beyond Responsive Web Design

INFORMATIONARCHITECTS.JPWIDE DESKTOP > DESKTOP > MOBILE

Page 17: Beyond Responsive Web Design

“Switchy” designs

Page 18: Beyond Responsive Web Design

“Switchy” designsNot responsive designs

Page 19: Beyond Responsive Web Design

COLLY.COMDESKTOP > NARROW > MOBILE

FLUID GRIDFLUID IMAGESMEDIA QUERIES

Page 20: Beyond Responsive Web Design

INFORMATIONARCHITECTS.JPWIDE DESKTOP > DESKTOP > MOBILE

FLUID GRIDFLUID IMAGES?MEDIA QUERIES

Page 21: Beyond Responsive Web Design

Media queries are not enough

Page 22: Beyond Responsive Web Design

Why not?

Page 23: Beyond Responsive Web Design

“Pinch-to-zoom makes any site usable on iPhone/Android”

“Viewport browsing still works on Blackberry”

“Only people with smartphones use the mobile web anyways”

Page 24: Beyond Responsive Web Design

Really?

Page 25: Beyond Responsive Web Design

A bit of perspective...

Page 26: Beyond Responsive Web Design

IPHONE SOLVES ALL PROBLEMS?IPHONE IS JUST A DROP IN THE MOBILE OCEAN

Page 27: Beyond Responsive Web Design

WEBKIT != FULL SUPPORT FOR MEDIA QUERIESWEBKIT SOLVES ALL PROBLEMS?

Page 28: Beyond Responsive Web Design

PROXY BROWSERS CAN ACT LIKE DESKTOP BROWSERSPHONE-NATIVE BROWSERS SOLVE ALL PROBLEMS?

Page 29: Beyond Responsive Web Design

INSANELY TINY TEXT WHEN MEDIA QUERIES FAILTABLETS SOLVE ALL PROBLEMS?

Page 30: Beyond Responsive Web Design

Cold, hard facts

Page 31: Beyond Responsive Web Design

World population, 2010: 6.9 billion

1.96 billion global Internet connections (28.7% of the world: 42% Asia, 24% Europe, 13% NA)

5.1 billion mobile subscriptions (over 4 billion use 2G GSM)

SOURCES: INTERNETWORLDSTATS.COM, BUDDE.COM.AU

Page 32: Beyond Responsive Web Design

1.3 billion mobile Internet users

Almost 1/3 of Internet users access only via mobile (including almost 25% of U.S. users)

Only 21% of mobile users have 3G access

Page 33: Beyond Responsive Web Design

1.96 billion Internet connections...

minus 1.3 billion mobile users...

equals about 500 million broadband Internet connections worldwide

Page 34: Beyond Responsive Web Design

WORLDWIDE MOBILE DEVICE SALESAPPLE? 3%. RIM? 3%. MOTOROLA? 3%. HTC? 2%.

Page 35: Beyond Responsive Web Design

The Jakarta effect

Page 36: Beyond Responsive Web Design

The Jakarta effect

Capital of Indonesia, ~9.6 million people

$100/month ADSL vs. ~$17/month unlimited mobile data

Proximity to China = cheap Shanzhai (“bandit”) phones

Page 37: Beyond Responsive Web Design

The Jakarta effect

~2 million BlackBerry users

Largest Twitter user base worldwide

#2 Opera Mini user base worldwide

#3 Facebook user base worldwide

Page 38: Beyond Responsive Web Design

So what do we do?

Page 39: Beyond Responsive Web Design

- BRYAN RIEGER, “RETHINKING THE MOBILE WEB”

Page 40: Beyond Responsive Web Design

Desktop before mobile is backward!

Mobile devices are less powerful than desktops

Mobile bandwidth is more expensive

So why are we sending more (and more complicated) code for mobile than desktop?

Page 41: Beyond Responsive Web Design

Mobile First

Mobile site + media queries = desktop site

Progressive enhancement

Page 42: Beyond Responsive Web Design

No support for media queriesis the first media queryMedia queries don’t work on most mobile devices

Most desktop browsers support media queries (and are powerful enough to use them without slowing down)

Old desktop browser = less complicated site!

Page 43: Beyond Responsive Web Design

Avoid unnecessary data transfer

NYTimes.com mobile: ~970KB

Page 44: Beyond Responsive Web Design

Avoid unnecessary data transfer

Guardian.co.uk mobile: ~80KB

Page 45: Beyond Responsive Web Design

Avoid unnecessary data transfer

display: none still uses bandwidth

Load images as progressive enhancement instead through media-queried stylesheets

Page 46: Beyond Responsive Web Design

Use JS for progressive enhancement only

Mobile devices are less powerful

Animation takes a lot of processing

Frameworks are big downloads

Page 47: Beyond Responsive Web Design

Use JS for progressive enhancement only

So, avoid JavaScript for mobile whenever possible

Use CSS3 animation instead

Amazon, FB, and Google all launched with no JS in their original designs

Page 48: Beyond Responsive Web Design

Testing!

Page 49: Beyond Responsive Web Design

OPERA MINI

UC WEB

Page 50: Beyond Responsive Web Design

Device-specific emulatorsNokia Symbian

RIM Blackberry

Palm webOS

Windows Mobile

iPhone SDK

Android SDK

Page 51: Beyond Responsive Web Design

Who gets it right?

Page 52: Beyond Responsive Web Design

HICKSDESIGN.CO.UKSUPER-WIDE > WIDE > TABLET > MOBILE (ALL FLUID)

Page 53: Beyond Responsive Web Design

STPAULSSCHOOL.ORG.UKTHREE COLUMN > TWO COLUMN > ONE COLUMN (ALL FLUID, WITH ANIMATION)

Page 54: Beyond Responsive Web Design

YIIBU.COMWIDE > NARROW (FLUID GRIDS + IMAGES GO A LONG WAY)

Page 55: Beyond Responsive Web Design

HUFFDUFFER.COMTWO LAYOUTS (THREE VARIATIONS)

Page 56: Beyond Responsive Web Design

Limitations

Page 57: Beyond Responsive Web Design

Conditional HTML

Image size overhead

Conditional JS behavior

Capabilities detection

Page 58: Beyond Responsive Web Design

“The choice is not between using media queries and creating a dedicated mobile site; the choice is between using media queries and doing nothing at all.”

- Jeremy Keith, “A responsive mind”

Page 59: Beyond Responsive Web Design

Resources

Volkside Wirify

filamentgroup’s “responsive-images” plugin

Sencha Animator

iAd Producer

Page 60: Beyond Responsive Web Design

Websites

Yiibu (and SlideShare page)

A List Apart

Unstoppable Robot Ninja

Mobiforge

Page 61: Beyond Responsive Web Design

Thanks!Kevin Zurawel

@kzurawelarborwebsolutions.com