Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
HowAboutWe for Couples Views & Styles Patterns
Search
Rebecca Miller-Webster
March 27, 2013
Programming
96
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
HowAboutWe for Couples Views & Styles Patterns
in Rails
Rebecca Miller-Webster
March 27, 2013
More Decks by Rebecca Miller-Webster
See All by Rebecca Miller-Webster
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Trust & Teams: 2019 Chicago CTO Summit
rmw
2
380
Refactoring Trust on Your Team (CTO Summit 2018)
rmw
1
1.6k
Trust and Teams: GORUCO 2017
rmw
0
320
Becoming an Engineer Leader Panel Intro Slide
rmw
0
380
Frameworks for Feedback (Long version) - 2016 May Self Conference
rmw
2
1.1k
Frameworks for Feedback (2015 May - RailsConf)
rmw
1
580
Frameworks for Feedback - DevOpsDays Chicago
rmw
0
1k
Tech Talk 101: Topic Generation
rmw
0
470
Other Decks in Programming
See All in Programming
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
0
1.5k
新卒PdEのリアル
ryu1013
1
500
iOSDC2026登壇資料.pdf
riofujimon
0
170
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
140
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
290
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
370
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
1.6k
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
120
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
120
スマート反転とウェブアクセシビリティ
camiha
0
210
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
140
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
490
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
46
8.3k
The Curse of the Amulet
leimatthew05
3
15k
Ruling the World: When Life Gets Gamed
codingconduct
0
330
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
500
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
910
Code Reviewing Like a Champion
maltzj
528
40k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
30 Presentation Tips
portentint
PRO
1
400
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
520
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Transcript
Overview of Couples Views/Styles HowAboutWe Server 1 pointer March 26,
2013
• logic in views is harder to test • views
are difficult to reason about Problem: Our Views are messy WTF is happening here??
Fix #0: SASS and View Styleguide! https://github.com/howaboutwe/sass-style-guide
NOT DESIGN Markup is about content
None
Use SASS THE GOOD PARTS
None
Variables are your friend
Mixin it up ... WITH
Decorators & Helpers WHEN SHIT GETS COMPLICATED
Decorators Logic moves with the OBJECT Helpers Logic moves with
the VIEW
Move logic out of views When • if statements •
ternary • lots of states • It hurts my head Then Generate in (testable) code • Classes • Copy • Html attributes
This
TO
How?
Generate classes
Move classes up
None
Generate Copy
Encapsulate repetition in partials Sometimes zero Sometimes one Sometimes two
None
Generate html attributes From TO WITH
Our current pattern • Use & enforce styleguide for SASS
& views • Markup is about content not design • Use SASS ◦ variables ◦ mixins • Move classes up & design changes to CSS • Use decorators (or helpers) to: ◦ Generate classes ◦ Generate copy ◦ Generate HTML attributes