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
71
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
26
2.3k
Trust & Teams: 2019 Chicago CTO Summit
rmw
2
180
Refactoring Trust on Your Team (CTO Summit 2018)
rmw
1
1k
Trust and Teams: GORUCO 2017
rmw
0
150
Becoming an Engineer Leader Panel Intro Slide
rmw
0
180
Frameworks for Feedback (Long version) - 2016 May Self Conference
rmw
2
620
Frameworks for Feedback (2015 May - RailsConf)
rmw
1
390
Frameworks for Feedback - DevOpsDays Chicago
rmw
0
800
Tech Talk 101: Topic Generation
rmw
0
280
Other Decks in Technology
See All in Technology
日本が誇るイタリアのダンスミュージック!? ユーロビートって何??
minorun365
PRO
1
130
使われないものを作るな!出口から作るデータ分析基盤 / Data Platform Development Starting from the User Needs
amaotone
16
4.2k
スクラムに出会って「できた」を実感できるようになってきた話 / Scrum makes me feel like I can do it
yayoi_dd
2
110
Cloudflare WorkersがPythonに対応したので試してみた
miura55
0
190
LLM評価の落とし穴~開発者目線で気をつけるポイント~
rishigami
10
3.1k
類似ロジック実装をiOS/Android間で合わせる道標No.1
fumiyasac0921
1
220
AI JIMY - 登壇(インストール編)
hanacchi
0
150
Real World Type Puzzle and Code Generation
yukukotani
4
620
#phpconkagawa レガシーコードにもオブザーバビリティを 〜少しずつ始めるサービス監視〜
yamato_sorariku
0
510
グイグイ系QAエンジニアでやっていくよ!
____rina____
0
730
TypeScript の抽象構文木を用いた、数百を超える API の大規模リファクタリング戦略
yanaemon
6
1.2k
Kaggleで学ぶ系列データのための深層学習モデリング
yu4u
7
1.7k
Featured
See All Featured
Atom: Resistance is Futile
akmur
260
25k
Fontdeck: Realign not Redesign
paulrobertlloyd
76
4.9k
How STYLIGHT went responsive
nonsquared
92
4.8k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
The Invisible Side of Design
smashingmag
294
49k
Practical Orchestrator
shlominoach
183
9.8k
GraphQLの誤解/rethinking-graphql
sonatard
56
9.3k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
275
13k
Making the Leap to Tech Lead
cromwellryan
125
8.6k
Side Projects
sachag
451
41k
The Mythical Team-Month
searls
217
42k
RailsConf 2023
tenderlove
9
580
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!