100
Tim Wright, @csskarma Wednesday, August 31, 2011

Implementing a Scalable Mobile Strategy

Embed Size (px)

DESCRIPTION

Talk about creating and scaling your Web strategy by keeping development reasonable, building and designing once, and properly communicating on your team

Citation preview

Page 1: Implementing a Scalable Mobile Strategy

Tim Wright, @csskarma

Wednesday, August 31, 2011

Page 2: Implementing a Scalable Mobile Strategy

About me.

• BU  App  Dev

• CSSkarma

• Smashing  Magazine  &  SitePoint

Wednesday, August 31, 2011

Page 3: Implementing a Scalable Mobile Strategy

What we’ll talk about

• IE  6/7

• Guiding  principles

• Proper  detection

• Performance

Wednesday, August 31, 2011

Page 4: Implementing a Scalable Mobile Strategy

The Goal.

scale  your  mobile  strategy.

Wednesday, August 31, 2011

Page 5: Implementing a Scalable Mobile Strategy

The Goal.

scale  your  mobile  strategy.Web

Wednesday, August 31, 2011

Page 6: Implementing a Scalable Mobile Strategy

Let’s step back.

Wednesday, August 31, 2011

Page 7: Implementing a Scalable Mobile Strategy

Why  do  we  hate  IE  6/7?

Let’s step back.

Wednesday, August 31, 2011

Page 8: Implementing a Scalable Mobile Strategy

body  {   color:  red;  /*  normal  */   color:  green\9;  /*  IE8  and  below  */   *color:  yellow;  /*  IE7  and  below  */   _color:  orange;  /*  IE6  */}

Let’s step back.

Wednesday, August 31, 2011

Page 9: Implementing a Scalable Mobile Strategy

<!-­‐-­‐[if  IE]><link  href="ie.css"  rel="stylesheet"  media="all"><![endif]-­‐-­‐>

<!-­‐-­‐[if  lte  IE  7]><link  href="ie7.css"  rel="stylesheet"  media="all"><![endif]-­‐-­‐>

<!-­‐-­‐[if  lt  IE  7]><link  href="ie6.css"  rel="stylesheet"  media="all"><![endif]-­‐-­‐>

Let’s step back.

Wednesday, August 31, 2011

Page 10: Implementing a Scalable Mobile Strategy

<!-­‐-­‐[if  lt  IE  7  ]>  <body  class="ie6">  <![endif]-­‐-­‐>

<!-­‐-­‐[if  IE  7  ]>  <body  class="ie7">  <![endif]-­‐-­‐>

<!-­‐-­‐[if  IE  8  ]>  <body  class="ie8">  <![endif]-­‐-­‐>

<!-­‐-­‐[if  (gte  IE  9)|!(IE)]><!-­‐-­‐>  <body>  <!-­‐-­‐<![endif]-­‐-­‐>

Let’s step back.

Wednesday, August 31, 2011

Page 11: Implementing a Scalable Mobile Strategy

For  IE.Let’s step back.

HTML

CSS

JS

body  element

hacks/conditionals

detection

Wednesday, August 31, 2011

Page 12: Implementing a Scalable Mobile Strategy

We’re  doing  it  for  mobile  too...

Let’s step back.

Wednesday, August 31, 2011

Page 13: Implementing a Scalable Mobile Strategy

example.comm.example.com

Let’s step back.

Wednesday, August 31, 2011

Page 14: Implementing a Scalable Mobile Strategy

Let’s step back.

HTML

CSS

JS

mobile  HTML

mobile  CSS

mobile  JS

switching

device  list

mechanism

Wednesday, August 31, 2011

Page 15: Implementing a Scalable Mobile Strategy

c’mon,  really?

Let’s step back.

Wednesday, August 31, 2011

Page 16: Implementing a Scalable Mobile Strategy

Guiding principles.

Wednesday, August 31, 2011

Page 17: Implementing a Scalable Mobile Strategy

Guiding principles.

1

34 2

Wednesday, August 31, 2011

Page 18: Implementing a Scalable Mobile Strategy

Guiding principles.

1

34

More  stuff  is  harder  to  manage.

2

Wednesday, August 31, 2011

Page 19: Implementing a Scalable Mobile Strategy

Guiding principles.

1

34

More  stuff  is  harder  to  manage.

Build  it  once,  buildit  right2

Wednesday, August 31, 2011

Page 20: Implementing a Scalable Mobile Strategy

Guiding principles.

1

34

More  stuff  is  harder  to  manage.

Build  it  once,  buildit  right

Think  &  Communicate

2

Wednesday, August 31, 2011

Page 21: Implementing a Scalable Mobile Strategy

Guiding principles.

1

34

More  stuff  is  harder  to  manage

Build  it  once,  buildit  right

Think  &  Communicate

Talk  aboutsuccess 2

Wednesday, August 31, 2011

Page 22: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage

Wednesday, August 31, 2011

Page 23: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage

Wednesday, August 31, 2011

Page 24: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage

Wednesday, August 31, 2011

Page 25: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage.

Wednesday, August 31, 2011

Page 26: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage.

Wednesday, August 31, 2011

Page 27: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage.

Wednesday, August 31, 2011

Page 28: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage.

Wednesday, August 31, 2011

Page 29: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage.

Wednesday, August 31, 2011

Page 30: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage.

Wednesday, August 31, 2011

Page 31: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage.

Wednesday, August 31, 2011

Page 32: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage.

Don’t over think it.

Wednesday, August 31, 2011

Page 33: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage

Wednesday, August 31, 2011

Page 34: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage. XX

Wednesday, August 31, 2011

Page 35: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage. XX

XX X XX X X

Wednesday, August 31, 2011

Page 36: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage. XX

XX X XX X X

Wednesday, August 31, 2011

Page 37: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage.

Wednesday, August 31, 2011

Page 38: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage.

Good  performance-­‐  cut  down  h2p  requests-­‐  op5mize  JS  &  CSS

Quick  access  to  informa5on

Policy  for  targe.ng  mobile  users

Wednesday, August 31, 2011

Page 39: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage.

Wednesday, August 31, 2011

Page 40: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage.

Wednesday, August 31, 2011

Page 41: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage.Policy  for  targe.ng  mobile  usersGood  performance-­‐  cut  down  h2p  requests-­‐  op5mize  JS  &  CSS

Quick  access  to  informa5on

Wednesday, August 31, 2011

Page 42: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage.Policy  for  targe.ng  mobile  users

all

Good  performance-­‐  cut  down  h2p  requests-­‐  op5mize  JS  &  CSS

Quick  access  to  informa5on

Wednesday, August 31, 2011

Page 43: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage. XX

XX X XX X X

Wednesday, August 31, 2011

Page 44: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage.

Wednesday, August 31, 2011

Page 45: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage.

Wednesday, August 31, 2011

Page 46: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage.

Wednesday, August 31, 2011

Page 47: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage.

Wednesday, August 31, 2011

Page 48: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage.

this  is  fun!

Wednesday, August 31, 2011

Page 49: Implementing a Scalable Mobile Strategy

1 More  stuff  is  harder  to  manage. this  is  kinda  sucks

:-­‐(

fake  happiness

Wednesday, August 31, 2011

Page 50: Implementing a Scalable Mobile Strategy

Solution?

1 More  stuff  is  harder  to  manage.

Wednesday, August 31, 2011

Page 51: Implementing a Scalable Mobile Strategy

Solution?  have  less  stuff.

1 More  stuff  is  harder  to  manage.

Wednesday, August 31, 2011

Page 52: Implementing a Scalable Mobile Strategy

2 Build  it  once,  build  itright.

Wednesday, August 31, 2011

Page 53: Implementing a Scalable Mobile Strategy

2 Build  it  once,  build  itright.

structural  layer

Wednesday, August 31, 2011

Page 54: Implementing a Scalable Mobile Strategy

2 Build  it  once,  build  itright.

presentation  layer

Wednesday, August 31, 2011

Page 55: Implementing a Scalable Mobile Strategy

2 Build  it  once,  build  itright.

behavior  layer

Wednesday, August 31, 2011

Page 56: Implementing a Scalable Mobile Strategy

2 Build  it  once,  build  itright.

progressive enhancement, again?

Wednesday, August 31, 2011

Page 57: Implementing a Scalable Mobile Strategy

2 Build  it  once,  build  itright.

What  are  we  really  doing  here?

Wednesday, August 31, 2011

Page 58: Implementing a Scalable Mobile Strategy

2 Build  it  once,  build  itright.

vs.

Wednesday, August 31, 2011

Page 59: Implementing a Scalable Mobile Strategy

2 Build  it  once,  build  itright.

Changing  the  design?

Wednesday, August 31, 2011

Page 60: Implementing a Scalable Mobile Strategy

2 Build  it  once,  build  itright.

CSS

Changing  the  design?

media  queries.

Wednesday, August 31, 2011

Page 61: Implementing a Scalable Mobile Strategy

2 Build  it  once,  build  itright.

Changing  the  interaction?

Wednesday, August 31, 2011

Page 62: Implementing a Scalable Mobile Strategy

2 Build  it  once,  build  itright.

JS

Changing  the  interaction?

feature  detec5on

Wednesday, August 31, 2011

Page 63: Implementing a Scalable Mobile Strategy

2 Build  it  once,  build  itright.

A  combina5on  of  media queries  &  JS feature detection

Wednesday, August 31, 2011

Page 64: Implementing a Scalable Mobile Strategy

modernizr.script  loaders.

native  detection

2 Build  it  once,  build  itright.

Wednesday, August 31, 2011

Page 65: Implementing a Scalable Mobile Strategy

What  about  performance?

2 Build  it  once,  build  itright.

Wednesday, August 31, 2011

Page 66: Implementing a Scalable Mobile Strategy

Performance always matters.

2 Build  it  once,  build  itright.

Wednesday, August 31, 2011

Page 67: Implementing a Scalable Mobile Strategy

be2er  communica5on  =  be2er  performance

2 Build  it  once,  build  itright.

Wednesday, August 31, 2011

Page 68: Implementing a Scalable Mobile Strategy

3 Think  &  Communicate

Wednesday, August 31, 2011

Page 69: Implementing a Scalable Mobile Strategy

Don’t  solve  back-end  problems  with  JavaScript

3 Think  &  Communicate

Wednesday, August 31, 2011

Page 70: Implementing a Scalable Mobile Strategy

10  jQuery  plugins  in  a  cms  does  not  necessitate  a  Web  strategy

3 Think  &  Communicate

Wednesday, August 31, 2011

Page 71: Implementing a Scalable Mobile Strategy

slideshows.

3 Think  &  Communicate

Wednesday, August 31, 2011

Page 72: Implementing a Scalable Mobile Strategy

3 Think  &  Communicate

alumni.usc.edu

Wednesday, August 31, 2011

Page 73: Implementing a Scalable Mobile Strategy

3 Think  &  Communicate

Wednesday, August 31, 2011

Page 74: Implementing a Scalable Mobile Strategy

3 Think  &  Communicate

well,  there’s  your  problem

Wednesday, August 31, 2011

Page 75: Implementing a Scalable Mobile Strategy

3 Think  &  Communicate

data  (images)

only  display  what  you  need

server-­‐sidefallback

ajax  call

Wednesday, August 31, 2011

Page 76: Implementing a Scalable Mobile Strategy

Don’t  solve  front-end  problems  with  PHP

3 Think  &  Communicate

Wednesday, August 31, 2011

Page 77: Implementing a Scalable Mobile Strategy

3 Think  &  Communicate

detection.

Wednesday, August 31, 2011

Page 78: Implementing a Scalable Mobile Strategy

user agent  detection

3 Think  &  Communicate

Wednesday, August 31, 2011

Page 79: Implementing a Scalable Mobile Strategy

feature  detection

3 Think  &  Communicate

Wednesday, August 31, 2011

Page 80: Implementing a Scalable Mobile Strategy

Ask  yourself  somequestions...

3 Think  &  Communicate

Wednesday, August 31, 2011

Page 81: Implementing a Scalable Mobile Strategy

What  is  mobile  about  this  site?

3 Think  &  Communicate

Wednesday, August 31, 2011

Page 82: Implementing a Scalable Mobile Strategy

3 Think  &  Communicate

vs.

Wednesday, August 31, 2011

Page 83: Implementing a Scalable Mobile Strategy

Why  would  I  remove  content?

3 Think  &  Communicate

Wednesday, August 31, 2011

Page 84: Implementing a Scalable Mobile Strategy

3 More  stuff  is  harder  to  manage. XX

XX X XX X X

Wednesday, August 31, 2011

Page 85: Implementing a Scalable Mobile Strategy

Nobody  wants  to  look  at  useless  content.

3 Think  &  Communicate

Wednesday, August 31, 2011

Page 86: Implementing a Scalable Mobile Strategy

Why  is  this  performing  poorly?

3 Think  &  Communicate

Wednesday, August 31, 2011

Page 87: Implementing a Scalable Mobile Strategy

plugins.jQuery  loops.http  requests.

3 Think  &  Communicate

Wednesday, August 31, 2011

Page 88: Implementing a Scalable Mobile Strategy

solution?

3 Think  &  Communicate

Wednesday, August 31, 2011

Page 89: Implementing a Scalable Mobile Strategy

solution?  talk  to  people.

3 Think  &  Communicate

Wednesday, August 31, 2011

Page 90: Implementing a Scalable Mobile Strategy

4 Talk  about  yoursuccess

Wednesday, August 31, 2011

Page 91: Implementing a Scalable Mobile Strategy

4 Talk  about  yoursuccess

...  educate  aboutyour  failures.

Wednesday, August 31, 2011

Page 92: Implementing a Scalable Mobile Strategy

4 Talk  about  your  success

Wednesday, August 31, 2011

Page 93: Implementing a Scalable Mobile Strategy

4 Talk  about  your  success

Best mobile Web site of

2011 by edustyle.net

Wednesday, August 31, 2011

Page 94: Implementing a Scalable Mobile Strategy

4 Talk  about  your  success

Best mobile Web site of

2011 by edustyle.net

Wednesday, August 31, 2011

Page 95: Implementing a Scalable Mobile Strategy

4 Talk  about  your  success

Best mobile Web site of 2011 by edustyle.net

Wednesday, August 31, 2011

Page 96: Implementing a Scalable Mobile Strategy

4 Talk  about  yoursuccess

m. vs. /mdetection (presto engine)switching mechanismcookies?double designdouble development

Wednesday, August 31, 2011

Page 97: Implementing a Scalable Mobile Strategy

What we talked about

• IE  6/7

• Guiding  principles

• Feature  detection

• Performance

Wednesday, August 31, 2011

Page 98: Implementing a Scalable Mobile Strategy

Hang  some

 ?’son  the  strategy

Wednesday, August 31, 2011

Page 99: Implementing a Scalable Mobile Strategy

Questions?

Wednesday, August 31, 2011

Page 100: Implementing a Scalable Mobile Strategy

twitter:  @csskarmae-mail:  [email protected]:  csskarma.com

Contact

h2p://bit.ly/sxsw-­‐csskarma

Wednesday, August 31, 2011