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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Rebecca Miller-Webster
March 27, 2013
Programming
97
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
390
Refactoring Trust on Your Team (CTO Summit 2018)
rmw
1
1.6k
Trust and Teams: GORUCO 2017
rmw
0
330
Becoming an Engineer Leader Panel Intro Slide
rmw
0
390
Frameworks for Feedback (Long version) - 2016 May Self Conference
rmw
2
1.1k
Frameworks for Feedback (2015 May - RailsConf)
rmw
1
600
Frameworks for Feedback - DevOpsDays Chicago
rmw
0
1k
Tech Talk 101: Topic Generation
rmw
0
480
Other Decks in Programming
See All in Programming
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
150
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.5k
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5.1k
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
0
1k
すこし踏み込む CancellationToken
htkym
2
1.7k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
750
Railsバージョンを4倍にした話
optim
0
350
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
4
3.5k
SREの越境 / SRE Collaboration
y0hgi
2
310
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
1.1k
Featured
See All Featured
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
Deep Space Network (abreviated)
tonyrice
0
370
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
730
Ethics towards AI in product and experience design
skipperchong
2
430
Building an army of robots
kneath
307
47k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Un-Boring Meetings
codingconduct
0
460
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
280
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
640
Done Done
chrislema
187
17k
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