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
110
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
33
2.8k
Trust & Teams: 2019 Chicago CTO Summit
rmw
2
270
Refactoring Trust on Your Team (CTO Summit 2018)
rmw
1
1.3k
Trust and Teams: GORUCO 2017
rmw
0
220
Becoming an Engineer Leader Panel Intro Slide
rmw
0
270
Frameworks for Feedback (Long version) - 2016 May Self Conference
rmw
2
860
Frameworks for Feedback (2015 May - RailsConf)
rmw
1
470
Frameworks for Feedback - DevOpsDays Chicago
rmw
0
880
Tech Talk 101: Topic Generation
rmw
0
340
Other Decks in Technology
See All in Technology
データの品質が低いと何が困るのか
kzykmyzw
6
1.1k
CZII - CryoET Object Identification 参加振り返り・解法共有
tattaka
0
350
現場の種を事業の芽にする - エンジニア主導のイノベーションを事業戦略に装着する方法 -
kzkmaeda
2
2k
明日からできる!技術的負債の返済を加速するための実践ガイド~『ホットペッパービューティー』の事例をもとに~
recruitengineers
PRO
3
390
AndroidデバイスにFTPサーバを建立する
e10dokup
0
250
表現を育てる
kiyou77
1
210
室長と気ままに学ぶマイクロソフトのビジネスアプリケーションとビジネスプロセス
ryoheig0405
0
360
自動テストの世界に、この5年間で起きたこと
autifyhq
10
8.4k
プロセス改善による品質向上事例
tomasagi
2
2.5k
2.5Dモデルのすべて
yu4u
2
840
関東Kaggler会LT: 人狼コンペとLLM量子化について
nejumi
3
570
2024.02.19 W&B AIエージェントLT会 / AIエージェントが業務を代行するための計画と実行 / Algomatic 宮脇
smiyawaki0820
13
3.2k
Featured
See All Featured
Done Done
chrislema
182
16k
Into the Great Unknown - MozCon
thekraken
35
1.6k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
4 Signs Your Business is Dying
shpigford
182
22k
Building a Scalable Design System with Sketch
lauravandoore
461
33k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
133
33k
Designing Experiences People Love
moore
140
23k
Practical Orchestrator
shlominoach
186
10k
Large-scale JavaScript Application Architecture
addyosmani
511
110k
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!