Transcript
Page 1: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

OOCSS IN THE REAL WORLDA Case Study from the CBC

Page 2: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan
Page 3: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan
Page 4: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan
Page 5: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

CBC.CA

• 9.1 million pages in Google• 4.5 million visits per month• 200 stories a day• 24 UI developers

Page 6: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

CBC.CA

9.1 million pages in Google4.5 million visits per month200 stories a day24 UI developers+

Complexity

Page 7: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

http://www.flickr.com/photos/samsushiro/8741594581

Page 8: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

How can we do things better?

Page 9: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

How can we do things better?

OOCSS

Page 10: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

OOCSS is a technique, not a technology

Page 11: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

NICOLE SULLIVAN

stubbornella.org

Page 12: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

“Following our beloved best practices leads to bad outcomes every. single. time.”

~Nicole Sullivan

Page 13: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan
Page 14: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

.topstories ul.primary { float: left; width: 460px; }.topstories ul.secondary { float: right; width: 140px; }.topstories ul.secondary li { border-bottom: 1px solid #ccc; }

Page 15: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan
Page 16: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

#editorspicks {background: #eee; border-top: 5px solid

#ccc; }#editorspicks ul li { border-bottom: 1px solid #ccc; }

Page 17: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

STATS

Style sheets 16float: left; 78font-size: *; 114width: 300px; 34border-top: 5px solid #c4c4c4;

7

Page 18: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan
Page 19: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan
Page 20: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan
Page 21: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan
Page 22: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

.media

Page 23: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

.media_reversed

Page 24: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

Embrace visual semantics

Page 25: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

OPERATIONTWITTER

BOOTSTRAP

Page 26: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

THE PLAN

1. Find a framework2. Use it

Page 27: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

FRAMEWORKS

• Twitter Bootstrap• OOCSS• inuit.css• Pure

Page 28: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan
Page 29: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

OPERATIONCBC BOOTSTRAP

Page 30: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

THE PLAN

1. Identify visual patterns2. Codify objects3. Get crazy with the classes

Page 31: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

CHALLENGE

RETRAINING YOUR GUT

Page 32: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

BENEFIT

GRIDS ARE A

GATEWAY TO OOCSS

Page 33: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

CHALLENGE

NAMING IS HARD

Page 34: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan
Page 35: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

.distinct

Page 36: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

BENEFIT

TIGHTER

INTEGRATION WITH

DESIGN

Page 37: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan
Page 38: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

CHALLENGE

FINDING THE RIGHT GRANULARITY

Page 39: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

BENEFIT

SEEING THE

REUSE HAPPEN

Page 40: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

.contentlist

Page 41: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

.contentlist_grid

Page 42: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

.repel

Page 43: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

.videolink

Page 44: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan
Page 45: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

BENEFIT

A CMS PRODUCES

STANDARDIZED CODE

Page 46: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

CHALLENGE

A CMS PRODUCES

STANDARDIZED CODE

Page 47: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

LINEUP ROLL

News Sports

Page 48: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

The greatest weakness of OOCSS is the tight coupling between HTML and design

Page 49: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan
Page 50: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan
Page 51: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

OPERATIONWIDOWMAKER

Page 52: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

THE QUESTION

How do we have• reusable objects,• fixed HTML, and• multiple themes?

Page 53: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

THE ANSWER

Page 54: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

SASS @extend

Pre-compile Post-compile

Page 55: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

LINEUP ROLL

News Sports

Page 56: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan
Page 57: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

news.scss sports.scss

Page 58: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

LINEUP ROLL

News Sports

Page 59: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

OutputSASS

@extend

OOCSS

Core Library

news.scss

news.css

sports.scss

sports.css

Page 60: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

CHALLENGE

BUILD PROCESS IS MORE COMPLEX

Page 61: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

CHALLENGE

COMPILED CODEIS OBFUSCATED

Page 62: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan
Page 63: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

BENEFIT

“BACKWARDS COMPATIBLE”

Page 64: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan
Page 65: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

BENEFIT

OPTIMIZATIONBECOMES CLEAR

Page 66: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan
Page 67: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan
Page 68: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

PODIUM• Reusable• Scalable

• Flexible• Themeable

Page 69: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

STATS

Style sheets 16float: left; 78font-size: *; 114width: 300px; 34border-top: 5px solid #c4c4c4;

7

Page 70: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

STATS

Style sheets 16 11float: left; 78 47font-size: *; 114 94width: 300px; 34 3border-top: 5px solid #c4c4c4;

7 1

Page 71: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

STATS

Style sheets 16 11 1float: left; 78 47 9font-size: *; 114 94 48width: 300px; 34 3 1border-top: 5px solid #c4c4c4;

7 1 1

Page 72: OOCSS in the Real World: A Case Study from the CBC with Jamie Strachan

RESOURCES

Jonathan SnookSMACSShttp://snook.ca

Nicole SullivanOOCSShttp://stubbornella.org

Harry Robertsinuit.csshttp://csswizardry.com

YandexBEMhttp://bem.info

Jamie [email protected]