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
70
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
24
2.2k
Trust & Teams: 2019 Chicago CTO Summit
rmw
2
170
Refactoring Trust on Your Team (CTO Summit 2018)
rmw
1
1k
Trust and Teams: GORUCO 2017
rmw
0
140
Becoming an Engineer Leader Panel Intro Slide
rmw
0
170
Frameworks for Feedback (Long version) - 2016 May Self Conference
rmw
2
590
Frameworks for Feedback (2015 May - RailsConf)
rmw
1
370
Frameworks for Feedback - DevOpsDays Chicago
rmw
0
780
Tech Talk 101: Topic Generation
rmw
0
260
Other Decks in Technology
See All in Technology
Azureコストは水道代/The_47th_Tokyo_Jazug
aeonpeople
3
390
MongoDB Atlas Vectorsearchではじめる生成AIアプリ開発
chie8842
3
510
技術イベントはなんとかひねり出す 日経の技術広報の取り組み/techpr3
nishiuma
0
230
こんなに簡単!AWSマルチアカウント
takuya_terada
0
120
プッシュ型子育てサービスを、先行プロジェクト実施自治体において開始します
govtechtokyo
0
290
Challenges - Open Farming Hackdays 2024
loleg
0
580
HoneycombとOpenTelemetryでオブザーバビリティに入門してみる
sumiren
2
160
単回帰分析について数式を追いながら実装してみた
kentaitakura
0
510
技術広報経験0のEMがエンジニアブランディングをはじめてみた
coconala_engineer
1
140
期待しすぎずに取り組む両面 TypeScript
shozawa
4
560
サービス成長と共に肥大化するモノレポ、長くなるCI時間 / As services grow, monorepos get bigger and CI time gets longer
kohbis
5
2.1k
ビジネスロジックを「型」で表現するOOPのための関数型DDD / Functional And Type-Safe DDD for OOP
yuitosato
29
12k
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
6
950
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
1
1.2k
Building a Modern Day E-commerce SEO Strategy
aleyda
15
6.3k
The MySQL Ecosystem @ GitHub 2015
samlambert
242
12k
Building a Scalable Design System with Sketch
lauravandoore
455
32k
Faster Mobile Websites
deanohume
296
30k
WebSockets: Embracing the real-time Web
robhawkes
59
6.9k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
657
120k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
The Straight Up "How To Draw Better" Workshop
denniskardys
227
130k
Ruby is Unlike a Banana
tanoku
95
10k
Why Our Code Smells
bkeepers
PRO
330
56k
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!