61
NT102: Getting Down and Dirty with Responsive Web Design Martin Ridgway, Perficient - Lead User Experience Designer

Getting Down & Dirty with Responsive Web Design

Embed Size (px)

Citation preview

Page 1: Getting Down & Dirty with Responsive Web Design

NT102: Getting Down and Dirty with Responsive Web Design

Martin Ridgway, Perficient - Lead User Experience Designer

Page 2: Getting Down & Dirty with Responsive Web Design

About Perficient

Perficient (perficient.com) is a leading information technology consulting firm

serving clients throughout North America. We help clients implement business-

driven technology solutions that integrate business processes, improve worker

productivity, increase customer loyalty and create a more agile enterprise to better

respond to new business opportunities.

Page 3: Getting Down & Dirty with Responsive Web Design

Perficient Solutions, Expertise and Services

Perficient brings deep solutions expertise and offers a complete set of flexible services to help clients implement business-driven IT solutions

Business-Driven SolutionsEnterprise PortalsSOA and Business Process ManagementBusiness IntelligenceUser-Centered Custom ApplicationsCRM SolutionsEnterprise Performance ManagementCustomer Self-ServiceeCommerce & Product Information

ManagementEnterprise Content ManagementIndustry-Specific SolutionsMobile TechnologySecurity Assessments

Perficient Services End-to-End Solution Delivery IT Strategic Consulting IT Architecture Planning Business Process & Workflow Consulting Usability and UI Consulting Custom Application Development Offshore Development Package Selection, Implementation and

Integration Architecture & Application Migrations Education

Page 4: Getting Down & Dirty with Responsive Web Design

Perficient XD

STRATEGY & IDEATION

RESEARCH & ANALYSIS

CREATIVE & INTERACTION DESIGN

INNOVATION &IMPLEMENTATION

• Envisioning Workshops• Industry Trend Forecasting • Media Research Analysis • Strategies for:

• Digital Campaigns• Brand Loyalty & eCRM • Social Media &

Governance • Content & Engagements• Mobile

• Contextual Inquiry/Interviews

• Brand Identity Assessment & Competitive Benchmarking

• User Profiles and Personas

• Card Sorting for Information Architecture

• Heuristic Evaluation & Usability Testing

• Web & Campaign Analytics

• Visual Design

• Information Architecture & Interaction Design

• Mobile Design

• Digital Publishing

• Marketing Campaigns and Content

• Iterative Prototype Design

• Search Engine Optimization

• UI Development

• Mobile Development

• Emerging Platforms

SOCIALCAMPAIGNS

& CONTENT MOBILE

Page 5: Getting Down & Dirty with Responsive Web Design

TL;DR

Page 6: Getting Down & Dirty with Responsive Web Design

What we’ll be covering today

• There’s something big on the horizon

• What we can do - just what is Responsive Web Design anyway?

• Examples please - show me this new hotness

• Drawbacks and criticisms – it’s not all roses, right?

• The business case for Responsive Web Design

• Down and dirty with the code – implementing a Responsive Web Design

Page 7: Getting Down & Dirty with Responsive Web Design

There’s something coming

Page 8: Getting Down & Dirty with Responsive Web Design

“Day by day, the number of devices, platforms, and browsers that need to work with your site grows.”

(He founded Adaptive Path as well as Typekit, and has worked for Google. He’s clever. Take heed.)

JEFFREY VEEN SAYS:

Page 9: Getting Down & Dirty with Responsive Web Design

Remember when…

…it was just this?

Page 10: Getting Down & Dirty with Responsive Web Design

That time has gone

Page 11: Getting Down & Dirty with Responsive Web Design

The landscape’s getting more diverse

As of February 2012,

• There are 1.2 billion mobile Web users worldwide

• Mobile devices account for 8.49% of global website hits

• Many mobile Web users are mobile-only

And by 2015,

• Paying by mobile will be worth over $1 trillion

• Mobile commerce will reach $119 billion• US mobile commerce will be worth $31

billion

Source: MobiThinking - http://bit.ly/a2f9uO

With each passing day, the way society uses the Internet changes:

Page 12: Getting Down & Dirty with Responsive Web Design

So what can we do?

Page 13: Getting Down & Dirty with Responsive Web Design

One possible solution

Page 14: Getting Down & Dirty with Responsive Web Design

Well, no.

• That’d be silly• And expensive• …but mostly silly.

Page 15: Getting Down & Dirty with Responsive Web Design

Seriously dude…what can we do?

Page 16: Getting Down & Dirty with Responsive Web Design

“Day by day, the number of devices, platforms, and browsers that need to work with your site grows.Responsive Web Design represents a fundamental shift in how we’ll build websites for the decade to come.”

(Told you he’s clever)

LUCKILY, MY FRIEND* JEFF SAYS:

* may not really be my friend

Page 17: Getting Down & Dirty with Responsive Web Design

The pretty serious technology

Page 18: Getting Down & Dirty with Responsive Web Design

A responsive example

Responsive websites adapt (and respond) to

their environment.

Same site, different experiences.

Page 19: Getting Down & Dirty with Responsive Web Design

Or, to put it another way

One website, many screens

Page 20: Getting Down & Dirty with Responsive Web Design

Why?

• One solution to rule them all• One codebase means one set of metrics for all users• A responsive design allows for greater consistency of brand across

all experiences

Page 21: Getting Down & Dirty with Responsive Web Design

How?

Be pragmatic!

• Review your traffic logs and determine what mobile devices are accessing your site today

• Test your site on those devices and determine where the experience breaks down

• Develop an action plan to address common issues, such as:

• Content that is only accessible when a user hovers over something• Controls that are too small to manipulate on touch screens• Popup (or modal) windows that are unusable on small screens• A lot of heavy graphics and media

Page 22: Getting Down & Dirty with Responsive Web Design

Examples please!

Page 23: Getting Down & Dirty with Responsive Web Design

Boston Globe

bostonglobe.com

Page 24: Getting Down & Dirty with Responsive Web Design

St. Paul’s School, London

stpaulsschool.org.uk

Page 25: Getting Down & Dirty with Responsive Web Design

Arizona State University

asuonline.asu.edu

Page 26: Getting Down & Dirty with Responsive Web Design

Any drawbacks?

Page 27: Getting Down & Dirty with Responsive Web Design

*

* may actually be a few drawbacks

Page 28: Getting Down & Dirty with Responsive Web Design

Yelp

Page 29: Getting Down & Dirty with Responsive Web Design

Why not Responsive Web Design?

3 reasons not to:1. Load time2. Integration with 3rd party applications3. The big one…

More time, more effort and therefore more moneythan building a desktop site ONLY

Page 30: Getting Down & Dirty with Responsive Web Design

But…

Page 31: Getting Down & Dirty with Responsive Web Design

Less time, less effort and therefore less moneyto build responsively, than building separate experiences for desktop iPhone and iPad

A responsive website that works with every device

Desktop site

iPad site

iPhone site

Tim

e to

dev

elop

(and that’s just for the desktop and two other devices!)

vs

The business case

Page 32: Getting Down & Dirty with Responsive Web Design

Not everyone agrees

Page 33: Getting Down & Dirty with Responsive Web Design

L IKE JAKOB NIELSEN* FOR EXAMPLE

* photograph may actually be Leslie Nielsen

Page 34: Getting Down & Dirty with Responsive Web Design

* photograph may still actually be Leslie Nielsen

“Good mobile user experience requires a different design than what's needed to satisfy desktop users.

Two designs, two sites, and cross-linking to make it all work.”

Source: http://www.useit.com/alertbox/mobile-vs-full-sites.html

JAKOB*, THIS IS BAD ADVICE

Page 35: Getting Down & Dirty with Responsive Web Design

Responses to Nielsen

“About 25 per cent of the people who use the mobile web only use a mobile browser. They never use a desktop computer. These users are disproportionately low income, black, and Hispanic.”

- Karen McGrane, UX professionalSource: http://bit.ly/HNvjFB

Serious Not-so serious

Page 36: Getting Down & Dirty with Responsive Web Design

Conclusions

• Does a responsive approach align to our site’s objectives?• Do our users expect a similar version of the website on their

phone as they do on their computer?• Do we have the time and the resources to do it?

Page 37: Getting Down & Dirty with Responsive Web Design

Getting down and dirty

Page 38: Getting Down & Dirty with Responsive Web Design

* You guys, after this bit

*

Page 39: Getting Down & Dirty with Responsive Web Design

The Theory

• A flexible grid• Flexible images and media• Media queries

- Ethan MarcotteSource: http://www.alistapart.com/articles/responsive-web-design

Responsive Web Design is 3 things

Page 40: Getting Down & Dirty with Responsive Web Design

CAUTIONCONTAINS

MATH

Page 41: Getting Down & Dirty with Responsive Web Design

Our base grid

900px

900px

960px#wrap

#main

Page 42: Getting Down & Dirty with Responsive Web Design

Target ÷ Context = Result

Page 43: Getting Down & Dirty with Responsive Web Design

A flexible grid – Calculating teh awsum

900px

900px

960px#wrap

#main

Target ÷ Context = Result

0.9375 * 100 = 93.75%

900 960 0.9375

Page 44: Getting Down & Dirty with Responsive Web Design

A flexible grid – the CSS

#wrap {width:95%;margin:0 auto;

}

#main {width:93.75%; /* 900/960=0.9375 */margin:0 auto;

}

Page 45: Getting Down & Dirty with Responsive Web Design

A flexible grid – more detail to our page

900px

900px

#wrap

#main

#pri #sec

660px 220px

660 ÷ 900 = 0.733333373.3333%

220 ÷ 900 = 0.244444424.4444%

Page 46: Getting Down & Dirty with Responsive Web Design

A flexible grid – CSS for our columns

#pri {float:left;width:73.33333%; /* 660/900=0.733333 */

}

#sec {float:right;width:24.44444%; /* 220/900=0.244444 */

}

Page 47: Getting Down & Dirty with Responsive Web Design

A flexible grid – OK, you’re kidding, right?

900px

#wrap

#main

#pri #sec

660px

1 2 3

4 5 6

{180px

.thumb

180 ÷ 660 = 0.2727272727272727.272727272727%

{

40px

Page 48: Getting Down & Dirty with Responsive Web Design

A flexible grid – you weren’t kidding

.thumb {float:left;width:27.272727272727%; /* 180/660=0.2727272727272727 */margin-right:6.060606060606%;/* 40/660=0.06060606060606 */

}

Page 49: Getting Down & Dirty with Responsive Web Design

Flexible images

<img src=“who-win.jpg” width=“300” height=“550” alt=“Doctor Win”>

<img src=“who-win.jpg” alt=“Doctor Win”>

img {max-width:100%;

}

And add this to your CSS:

Becomes this:

This:

Page 50: Getting Down & Dirty with Responsive Web Design

Flexible images, video and media, oh my!

img, embed, object, video {max-width:100%;

}

Page 51: Getting Down & Dirty with Responsive Web Design

Media queries – the CSS bad boys of RWD

@media screen and (min-width:960px) {

body {color:red;

}

}

Page 52: Getting Down & Dirty with Responsive Web Design

Media queries – multiple condition hotness

@media screen and (min-width:768px) and (orientation:landscape) {

body {color:red;

}

}

Page 53: Getting Down & Dirty with Responsive Web Design

Won’t SOMEBODY thinkof the children browsers?!?

Page 54: Getting Down & Dirty with Responsive Web Design

Media queries – browser support

• Works in all major browsers… …with the exception of Internet Explorer 8 and below

So what do we do about old IE?• Don’t worry about it!• …seriously you guys. Don’t.

Page 55: Getting Down & Dirty with Responsive Web Design

An example CSS file supporting older browsers

/* default styles go here, stuff for older IE, etc */

@media screen and (min-width:480px) {/* mobile device media query */

}

@media screen and (min-width:768px) {/* tablet device media query */

}

@media screen and (min-width:960px) {/* desktop media query (for new

browsers) */}

Page 56: Getting Down & Dirty with Responsive Web Design

OMG dude, where’sthe frameworks?

Page 57: Getting Down & Dirty with Responsive Web Design

Responsive frameworks

http://foundation.zurb.com

http://semantic.gs

Page 58: Getting Down & Dirty with Responsive Web Design

Responsive frameworks

http://www.getskeleton.com

http://csswizardry.com/inuitcss

Page 59: Getting Down & Dirty with Responsive Web Design

Any final tips? Hints? Cheats?C’MON MAN!

Page 60: Getting Down & Dirty with Responsive Web Design

View source

And try Twitter:• @rwd (Useful links)• @smashingmag (More useful links)• @beep (Ethan Marcotte)• @martinridgway (That’s me!)

Page 61: Getting Down & Dirty with Responsive Web Design

“Stay committed to your decisions, but stay flexible in your approach.”

- Tom Robbins, novelist