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
83
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
31
2.6k
Trust & Teams: 2019 Chicago CTO Summit
rmw
2
240
Refactoring Trust on Your Team (CTO Summit 2018)
rmw
1
1.2k
Trust and Teams: GORUCO 2017
rmw
0
190
Becoming an Engineer Leader Panel Intro Slide
rmw
0
230
Frameworks for Feedback (Long version) - 2016 May Self Conference
rmw
2
800
Frameworks for Feedback (2015 May - RailsConf)
rmw
1
440
Frameworks for Feedback - DevOpsDays Chicago
rmw
0
850
Tech Talk 101: Topic Generation
rmw
0
320
Other Decks in Technology
See All in Technology
なぜ Rack を理解すべきかプレトーク / Why should you understand Rack - Pre-talk
hogelog
0
250
開発健全性の可視化と開発者体験の改善 ~ Compassでエンジニアに活力と生産性を ~
atlassianjapan
0
100
Covariance, Contravariance & Diamond
alexdaubois
1
120
JBoss EAPによるクラウドネイティブのススメ
chiroito
0
150
MOSH_companydeck_202410
mosh_inc
0
120
AWS CDK を活用した 大量 AWS アカウントへのプロビジョニング例 〜 SaaSus Platform の場合 〜 於 JAWS-UG CDK支部 #17
yaggy
1
180
管理画面とユーザー機能の調和を取り戻す!~クエリパフォーマンス改善の成功物語~ / Restore harmony between administrative and user functions!
minisera
1
360
いまからでも遅くない!コンテナでWebアプリを動かしてみよう入門(2-2)WebAPIハンズオン
nomu
0
130
プログラミング写経のすすめ
natsutan
0
190
Creating Intuitive Developer Tool in Swift
giginet
PRO
0
180
全部見せます! BigQueryのコスト削減の手法とその効果 / BigQuery Cost Reduction Methods
shiozaki
1
150
0x5F3759DF
ykozw
0
370
Featured
See All Featured
Practical Orchestrator
shlominoach
186
10k
Building Applications with DynamoDB
mza
90
6k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
22k
The Art of Programming - Codeland 2020
erikaheidi
51
13k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
9
650
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
A Philosophy of Restraint
colly
203
16k
GitHub's CSS Performance
jonrohan
1030
460k
Making the Leap to Tech Lead
cromwellryan
131
8.9k
Writing Fast Ruby
sferik
626
60k
Side Projects
sachag
452
42k
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!