design4drupal boston 2013 - bumps in the road to responsive

72
BUMPS IN THE ROAD Addressing the Challenges of Responsive Web Design

Upload: salem-ghoweri

Post on 15-Apr-2017

479 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

BUMPS IN THE ROADAddressing the Challenges of Responsive Web Design

Page 2: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

WHO WE ARE

• Michael Miles (@mikemiles86)

• Salem Ghoweri (@salem_ghoweri)

• Genuine Interactive (@WeAreGenuine)

Page 3: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

AS RESPONSIVE WEB DESIGN (RWD) IS MATURINGWE ARE BEGINNING TO

IDENTIFY AND UNDERSTANDTHE ROADBLOCKS

Page 4: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

WE ARE HERE TO SHARE WHAT WE’VE LEARNED

Page 5: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

RWD CHALLENGES

• many designers still think in terms of pixels

• traditional design software only supports static layouts

• confusion about what’s appropriate for which tools

• where to start? start from scratch? use community theme?

• page bloat (multiple versions of images, tons of javascript and css)

Page 6: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

IN THE BEGINNING

OF THE WEB...

Page 7: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

• Everyone used the same up-to-date Modern browser

Page 8: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

• On the same sized, perfectly calibrated monitor

Page 9: Design4Drupal Boston 2013 - Bumps in the Road to Responsive
Page 10: Design4Drupal Boston 2013 - Bumps in the Road to Responsive
Page 11: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

“Ever” -no one

Page 12: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

ASSUMPTIONS PERIOD:.COM BUBBLE - IPHONE

http://nataliemilton.com/wp-content/uploads/2013/03/960px-900.png

• “The web is just a page in a browser”

•Defined design areas.

•Only needed one design

Page 13: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

•Mobile web browsing

• Separate, different experiences for users.

•Need two designs

ASSUMPTIONS PERIOD:IPHONE - IPAD

Page 14: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

0

20

40

60

80

2008 2009 2010 2011 2012 2013 2014 2015

U.S. SMARTPHONE ADOPTION

Page 15: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

iPad Nexus 10 Galaxy Tab 3 Galaxy Note

Nexus 4iPhone 4S iPhone 5 Galaxy S 3 Galaxy S 4 Droid DNA HTC One Galaxy Note 2 Galaxy Mega LG Optimus

Nexus 7Galaxy Mega Galaxy Tab 3 iPad Mini

TODAY, THINGS ARE COMPLICATED.

Page 16: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

• There is only one web

• There is only one design

•Users expect one experience

ASSUMPTIONS PERIOD:IPAD - TODAY

Page 17: Design4Drupal Boston 2013 - Bumps in the Road to Responsive
Page 18: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

A PAGE IS NOT A PAGECan’t make assumptions

Fixed sizes: Gone

Must think differently

Page 19: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

HOW DO I DESIGN RESPONSIVELY?

Page 20: Design4Drupal Boston 2013 - Bumps in the Road to Responsive
Page 21: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

• Elements will shift • Define columns • Keep it simple

Page 22: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

eesc.mit.eduMIT EECS

Page 23: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

FROM FIXED TO FLUID

Designers:

• Think in terms of percentages

•Make element proportional to parents

•Discuss with developers

Page 24: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

SHARED VALUE INITIATIVEsharedvalue.org

Page 25: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

FLUID FLEXIBLE GRID

•Does not care about device

• Easy to implement

•Create clear, creative designs

Page 26: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

TOOLS IN AN AGE OF RESPONSIVE

Page 27: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

VS

Page 28: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

DESIGNING IN PHOTOSHOP

• Static mockups don’t translate into flexible layouts

• Impractical to mockup infinite number of layout variations

•Difficult to communicate behavior, gestures, animations, etc.

Page 29: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

YOU CAN’T DESIGN FOR THE UNKNOWN

Page 30: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

DESIGNING IN THE BROWSER

You lose details that might not easily translate to the browser!

•Not everyone is comfortable coding

• Problematic to build what hasn’t been explicitly defined

•Unknown factor : setting expectations and client sign-off are difficult

Page 31: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

• Adobe Edge Reflow

Page 32: Design4Drupal Boston 2013 - Bumps in the Road to Responsive
Page 33: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

THE “PERFECT” RWD DESIGNER TOOL DOESN’T EXIST YET

& MIGHT NEVER EXIST

Page 34: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

DON’T WAIT FOR PERFECT;USE WHAT WORKS FOR YOU

Page 35: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

ADDITIONALSOLUTIONS

Page 36: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

Style Tiles

Page 37: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

Style Guide

Page 38: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

Interactive Prototype

Page 39: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

Front-end Development & Drupal THEMING

Page 40: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

WHERE TO START?

• Project has a timeline and budget

• Limited amount of time to start

•Need to know your options

Page 41: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

TWO ROADS TO TRAVEL

Community Theme Custom Theme

Page 42: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

FIRST WORLD PROBLEMS

Page 43: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

THREE BEST OPTIONS(in our experience)

Adaptive Themes Omega Zen

Page 44: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

•Modern techniques (SASS, Compass, etc)

• Plugin system

• Plays well with others

PROS

drupal.org/project/adaptivethemeADAPTIVE THEMES

•Advanced settings

•Generate CSS files (6-8)

CONS

Page 45: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

•Optimize core CSS

•Drupal 8 CSS Standards

•Drush Integration

PROS

drupal.org/project/omegaOMEGA

•Advanced settings

•Unique “Zones” paradigm

CONS

Page 46: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

• Flexible Fluid Grid

• SASS or vanilla CSS

•Clean Templates

PROS

drupal.org/project/zenZEN

• Very basic

•More time consuming

CONS

Page 47: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

• Fits your workflow

• You control the code

•Customized to fit projects

PROS

CUSTOM THEME

• Very time consuming to build correctly

•No community support

CONS

Page 48: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

WHICH TO CHOOSE?

Flexibility & Time

Budget

Page 49: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

COMBATTING PAGE BLOAT

•Having a single code base with RWD is a double-edged sword

•Common practice is to hide and show device specific content (display: none)

• Remember: mobile users expect fast browsing experience

Browsers still download hidden inline images!

Page 50: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

THE SOLUTION: SEND LESS CODE!

Page 51: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

; Set the conditional stylesheets that are processed by IE.stylesheets-conditional[lt IE 7][all][] = ie6-and-below.cssstylesheets-conditional[IE 9][all][] = ie9.cssstylesheets-conditional[IE][print][] = ie-print.css

drupal.org/project/conditional_styles

Page 52: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

THE SOLUTION: SEND LESS CODE!

+

•Conditional Stylesheets Module

•Modularize CSS with SASS & Compass

• Load, fire your JavaScript conditionally (RequireJS, EnquireJS, Modernizr)

Page 53: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

THE SOLUTION: SEND LESS CODE!

•Conditional Stylesheets Module

•Modularize CSS with SASS & Compass

• Load, fire your JavaScript conditionally (RequireJS, EnquireJS, Modernizr)

Page 54: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

IMAGES. IMAGES EVERYWHERE.

Page 55: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

• Images account for ~60% of page weight

• Resolution independence is one of the largest challenges facing RWD

•Many techniques exist, browser vendor solutions in-progress (Picturefill, srcset)

Retina is here to stay.

IMAGES. IMAGES EVERYWHERE.

Page 56: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

SOLUTION #1:TACKLE EVERYTHING BUT

INLINE <IMG>

Page 57: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

ICONS & SPRITESFont-icons such as Icomoon or Font Awesome

Page 58: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

SVGScalable Vector Graphics (SVGs) for vector graphics, textures

Page 59: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

CSS3Background image gradients, textures, box-shadow, etc.

Page 60: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

CSS3CSS Hat plugin for Photoshop

Page 62: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

SOLUTION #2:DELIVER HIGH-RES INLINE IMAGES,

OPTIMIZED LIKE HELL

Page 63: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

DELIVER SUPER-OPTIMIZED RETINA <IMG>

Non-retina: 95KB400 x 300

Retina: 45KB1024 x 768

filamentgroup.com/lab/rwd_img_compression/

Page 64: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

SOLUTION 3:SHIM INLINE RESPONSIVE IMAGES

(FOR NOW)

Page 65: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

Adaptive Images ModuleJS-set cookie determines which image version is served

Page 66: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

 <span  data-­‐picture  data-­‐alt="A  giant  stone  face  at  The  Bayon  temple  in  Angkor  Thom,  Cambodia">                <span  data-­‐src="small.jpg"></span>                <span  data-­‐src="medium.jpg"          data-­‐media="(min-­‐width:  400px)"></span>                <span  data-­‐src="large.jpg"            data-­‐media="(min-­‐width:  800px)"></span>                <span  data-­‐src="extralarge.jpg"  data-­‐media="(min-­‐width:  1000px)"></span>

               <!-­‐-­‐  Fallback  content  for  non-­‐JS  browsers.  Same  img  src  as  the  initial,  unqualified  source  element.  -­‐-­‐>                <noscript>                        <img  src="external/imgs/small.jpg"  alt="A  giant  stone  face  at  The  Bayon  temple  in  Angkor  Thom,  Cambodia">                </noscript>        </span>

PictureFill Modulefuture <picture> element today via JS

Page 67: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

DOWN THE ROAD

Page 68: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

DRUPAL 8 MOBILE INITIATIVEgroups.drupal.org/mobile/drupal-8

• All core themes are HTML5 and responsive

• Front-end performance improvements (device detection, conditional loading, responsive images)

• Documentation & Guidelines

Page 69: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

TAKEAWAYS

• think percentages, not pixels

• mockup in BOTH photoshop & browser, or use tool like Reflow

• code your own theme if experienced, have time, and need lots of flexibility

• otherwise use Adaptive Theme, Omega, or Zen

• reduce page bloat with Compass, Sass., and conditional JS loading

Page 70: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

?

Page 71: Design4Drupal Boston 2013 - Bumps in the Road to Responsive
Page 72: Design4Drupal Boston 2013 - Bumps in the Road to Responsive

THANK YOU!