Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Cleaning up your views
Search
Rebecca Miller-Webster
April 03, 2013
Technology
2
96
Cleaning up your views
Rebecca Miller-Webster
April 03, 2013
Tweet
Share
More Decks by Rebecca Miller-Webster
See All by Rebecca Miller-Webster
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Trust & Teams: 2019 Chicago CTO Summit
rmw
2
260
Refactoring Trust on Your Team (CTO Summit 2018)
rmw
1
1.3k
Trust and Teams: GORUCO 2017
rmw
0
200
Becoming an Engineer Leader Panel Intro Slide
rmw
0
250
Frameworks for Feedback (Long version) - 2016 May Self Conference
rmw
2
840
Frameworks for Feedback (2015 May - RailsConf)
rmw
1
460
Frameworks for Feedback - DevOpsDays Chicago
rmw
0
870
Tech Talk 101: Topic Generation
rmw
0
340
Other Decks in Technology
See All in Technology
あの日俺達が夢見たサーバレスアーキテクチャ/the-serverless-architecture-we-dreamed-of
tomoki10
0
420
組織に自動テストを書く文化を根付かせる戦略(2024冬版) / Building Automated Test Culture 2024 Winter Edition
twada
PRO
8
3.2k
レンジャーシステムズ | 会社紹介(採用ピッチ)
rssytems
0
150
10個のフィルタをAXI4-Streamでつなげてみた
marsee101
0
160
ガバメントクラウドのセキュリティ対策事例について
fujisawaryohei
0
520
DevOps視点でAWS re:invent2024の新サービス・アプデを振り返ってみた
oshanqq
0
180
.NET 9 のパフォーマンス改善
nenonaninu
0
360
AI時代のデータセンターネットワーク
lycorptech_jp
PRO
1
280
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
250
AIのコンプラは何故しんどい?
shujisado
1
190
私なりのAIのご紹介 [2024年版]
qt_luigi
1
120
kargoの魅力について伝える
magisystem0408
0
200
Featured
See All Featured
Bash Introduction
62gerente
608
210k
Scaling GitHub
holman
458
140k
Typedesign – Prime Four
hannesfritz
40
2.4k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Rails Girls Zürich Keynote
gr2m
94
13k
Why Our Code Smells
bkeepers
PRO
335
57k
Gamification - CAS2011
davidbonilla
80
5.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
The Invisible Side of Design
smashingmag
298
50k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
Transcript
Cleaning up views with Decorators & Helpers Rebecca Miller-Webster
None
None
• logic in views is harder to test • views
are difficult to reason about Problem: Our Views are messy WTF is happening here??
Decorators & Helpers WHEN SHIT GETS COMPLICATED
Decorators Logic moves with the OBJECT Helpers Logic moves with
the VIEW
This
TO
How?
Generate classes
None
Generate Copy
Encapsulate repetition in partials Sometimes zero Sometimes one Sometimes two
None
Generate html attributes From TO WITH
Thank you!