49
BEYOND RESPONSIVE by Marcus Morba (drupal.org/user/710680 = mori) 1 Sunday 24 November 13

Beyond Responsive - Drupal Camp Vienna 2013

Embed Size (px)

DESCRIPTION

A session with Best-Practices & How to´s for targeting different devices (Web, Tablet & Smartphones) with Drupal 7 which goes beyond the possibilities of a responsive theme to deliver the best possible UI/UX for your visitors. What you will see: - Typical problems with targeting different devices - Personas & Use-Cases of visitors - How to setup different layouts for different devices - How to optimize/setup content displays for the different devices (Textlength, - Image-Sizes, Retina-Support, Optimize Source-Code ...) - Overview of useful modules - Drupal 8-Preview Session Details & a Demo-Installation: https://2013.drupalcamp.at/session/beyond-responsive-drupal-multi-device-setups Session-Recording: https://www.youtube.com/watch?v=1jWwrXEMWSQ

Citation preview

Page 1: Beyond Responsive - Drupal Camp Vienna 2013

BEYOND RESPONSIVEby Marcus Morba

(drupal.org/user/710680 = mori)

1Sunday 24 November 13

Page 2: Beyond Responsive - Drupal Camp Vienna 2013

my first responsive mobile experience

was in 2004

2Sunday 24 November 13

Page 3: Beyond Responsive - Drupal Camp Vienna 2013

2 target devices

target resolutions: 240 x 320 and 480 x 640

one code base for layout & content

no media queries

different CMS site structure & content for mobile

3Sunday 24 November 13

Page 4: Beyond Responsive - Drupal Camp Vienna 2013

DON´T LAUGH

4Sunday 24 November 13

Page 5: Beyond Responsive - Drupal Camp Vienna 2013

TODAYendless devices

countless resolutions

portrait & landscape

media queries ;-)

... and still more problems ;-(

5Sunday 24 November 13

Page 6: Beyond Responsive - Drupal Camp Vienna 2013

TYPICAL PROBLEMSdifferent resolutions & viewport´s

portrait & landscape views

different connection speeds & bandwidth

more browsers & versions

device optimized content

6Sunday 24 November 13

Page 7: Beyond Responsive - Drupal Camp Vienna 2013

WHAT WE WANTdeliver a device, bandwidth, resolution, page orientation and use-case dependent website

use-case? WHAT?

7Sunday 24 November 13

Page 8: Beyond Responsive - Drupal Camp Vienna 2013

WHY USE-CASES?different people = different situations = different needs

Simple examples:a user sitting at home at the evening (after store

opening hours) may have a different needs as a user on the run during lunch-break

second screen scenarios

8Sunday 24 November 13

Page 9: Beyond Responsive - Drupal Camp Vienna 2013

PROBLEMSwith “display: none”

if an element is not displayedit does NOT mean it isn´t loaded !!!

Normally browsers preload all of the images that they can identify in the source code

before any CSS or JavaScript is processed

9Sunday 24 November 13

Page 10: Beyond Responsive - Drupal Camp Vienna 2013

PROBLEMSTim Kadlec made a research on how images are downloaded when media queries are involved.

http://timkadlec.com/2012/04/media-query-asset-downloading-results/

https://github.com/tkadlec/Media-Query-test

10Sunday 24 November 13

Page 11: Beyond Responsive - Drupal Camp Vienna 2013

PROBLEMSwith “display: none”

11Sunday 24 November 13

Page 12: Beyond Responsive - Drupal Camp Vienna 2013

PROBLEMSwith “display: none”

<div  id="test1">        <img  src="images/test1.png"  alt=""  /></div>@media  all  and  (max-­‐width:  600px)  {        #test1  {  display:none;  }}

12Sunday 24 November 13

Page 13: Beyond Responsive - Drupal Camp Vienna 2013

13Sunday 24 November 13

Page 14: Beyond Responsive - Drupal Camp Vienna 2013

<div  id="test5"></div>@media  all  and  (min-­‐width:  601px)  {        #test5  {                background-­‐image:url('images/test5-­‐desktop.png');                width:200px;                height:75px;        }}@media  all  and  (max-­‐width:  600px)  {        #test5  {                background-­‐image:url('images/test5-­‐mobile.png');                width:200px;                height:75px;        }}

14Sunday 24 November 13

Page 15: Beyond Responsive - Drupal Camp Vienna 2013

15Sunday 24 November 13

Page 16: Beyond Responsive - Drupal Camp Vienna 2013

CONCLUSIONEmbedding images via CSS with

background-image works ...

but

now try to deliver images with a CMS!

16Sunday 24 November 13

Page 17: Beyond Responsive - Drupal Camp Vienna 2013

OUR OPTIONSdevice-side-only solutions

vs. server-side components

17Sunday 24 November 13

Page 18: Beyond Responsive - Drupal Camp Vienna 2013

LET´S DO IT!a simple server-side detection

example with Drupal

18Sunday 24 November 13

Page 19: Beyond Responsive - Drupal Camp Vienna 2013

Modules we needViews 7.x-3.7

Panels 7.x-3.3+41-dev

Mobile Detect 7.x-1.x-dev

19Sunday 24 November 13

Page 20: Beyond Responsive - Drupal Camp Vienna 2013

Step 1: content types

20Sunday 24 November 13

Page 21: Beyond Responsive - Drupal Camp Vienna 2013

Step 1: content types

21Sunday 24 November 13

Page 22: Beyond Responsive - Drupal Camp Vienna 2013

22Sunday 24 November 13

Page 23: Beyond Responsive - Drupal Camp Vienna 2013

Step 2: Image styles

23Sunday 24 November 13

Page 24: Beyond Responsive - Drupal Camp Vienna 2013

Step 3: Views

24Sunday 24 November 13

Page 25: Beyond Responsive - Drupal Camp Vienna 2013

25Sunday 24 November 13

Page 26: Beyond Responsive - Drupal Camp Vienna 2013

26Sunday 24 November 13

Page 27: Beyond Responsive - Drupal Camp Vienna 2013

27Sunday 24 November 13

Page 28: Beyond Responsive - Drupal Camp Vienna 2013

28Sunday 24 November 13

Page 29: Beyond Responsive - Drupal Camp Vienna 2013

Step 4: Panels

29Sunday 24 November 13

Page 30: Beyond Responsive - Drupal Camp Vienna 2013

30Sunday 24 November 13

Page 31: Beyond Responsive - Drupal Camp Vienna 2013

31Sunday 24 November 13

Page 32: Beyond Responsive - Drupal Camp Vienna 2013

32Sunday 24 November 13

Page 33: Beyond Responsive - Drupal Camp Vienna 2013

33Sunday 24 November 13

Page 34: Beyond Responsive - Drupal Camp Vienna 2013

34Sunday 24 November 13

Page 35: Beyond Responsive - Drupal Camp Vienna 2013

35Sunday 24 November 13

Page 36: Beyond Responsive - Drupal Camp Vienna 2013

36Sunday 24 November 13

Page 37: Beyond Responsive - Drupal Camp Vienna 2013

37Sunday 24 November 13

Page 38: Beyond Responsive - Drupal Camp Vienna 2013

38Sunday 24 November 13

Page 39: Beyond Responsive - Drupal Camp Vienna 2013

39Sunday 24 November 13

Page 40: Beyond Responsive - Drupal Camp Vienna 2013

The results

40Sunday 24 November 13

Page 41: Beyond Responsive - Drupal Camp Vienna 2013

41Sunday 24 November 13

Page 42: Beyond Responsive - Drupal Camp Vienna 2013

42Sunday 24 November 13

Page 43: Beyond Responsive - Drupal Camp Vienna 2013

43Sunday 24 November 13

Page 44: Beyond Responsive - Drupal Camp Vienna 2013

THANK YOU!

44Sunday 24 November 13

Page 45: Beyond Responsive - Drupal Camp Vienna 2013

WANT SOME MORE?

https://www.youtube.com/watch?v=1jWwrXEMWSQ

Please check the session recording for this:

45Sunday 24 November 13

Page 46: Beyond Responsive - Drupal Camp Vienna 2013

URL´s & Stuff:Module URL´s from the session & to the topics:

•http://usability.com/2013/03/personas-and-use-cases•http://www.cisco.com/en/US/solutions/ns1007/mobile_workers.html•http://vbridges.com/2013/03/26/virtual-personas-in-the-age-of-mobility/•http://www.slideshare.net/Muiskis/day3-ix-dpersonasscanariosuserstories

46Sunday 24 November 13

Page 47: Beyond Responsive - Drupal Camp Vienna 2013

URL´s & Stuff:Module URL´s from the session & to the topics:

•https://drupal.org/project/mobile_detect•https://drupal.org/project/mobile_switch•https://drupal.org/project/mobile_tools•https://drupal.org/project/browscap•https://drupal.org/project/mobilizer•https://drupal.org/project/wurfl•https://drupal.org/project/browserclass

47Sunday 24 November 13

Page 48: Beyond Responsive - Drupal Camp Vienna 2013

URL´s & Stuff:Module URL´s from the session & to the topics:

•https://drupal.org/project/image_resize_filter•https://drupal.org/project/zurb_interchange•https://drupal.org/project/resp_img•https://drupal.org/project/picture•https://drupal.org/project/imgfly•https://drupal.org/project/ais (adaptive image styles)•https://drupal.org/project/adaptive_image•https://drupal.org/project/retina_images•Use Google Translator if you can´t understand!•http://www.netvlies.nl/blog/design-interactie/retina-revolutie•http://www.netvlies.nl/blog/design-interactie/retina-revolutie-follow-up

48Sunday 24 November 13

Page 49: Beyond Responsive - Drupal Camp Vienna 2013

URL´s & Stuff:Module URL´s from the session & to the topics:

•https://drupal.org/project/breakpoints•https://drupal.org/project/breakpoint_panels•https://drupal.org/project/context_breakpoint

49Sunday 24 November 13