Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Cleaning up your views
Search
Rebecca Miller-Webster
April 03, 2013
Technology
180
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Cleaning up your views
Rebecca Miller-Webster
April 03, 2013
Transcript
16 slides
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!
More Decks by Rebecca Miller-Webster
See All by Rebecca Miller-Webster
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.9k
Trust & Teams: 2019 Chicago CTO Summit
rmw
2
400
Refactoring Trust on Your Team (CTO Summit 2018)
rmw
1
1.6k
Trust and Teams: GORUCO 2017
rmw
0
340
Becoming an Engineer Leader Panel Intro Slide
rmw
0
400
Frameworks for Feedback (Long version) - 2016 May Self Conference
rmw
2
1.1k
Frameworks for Feedback (2015 May - RailsConf)
rmw
1
610
Frameworks for Feedback - DevOpsDays Chicago
rmw
0
1k
Tech Talk 101: Topic Generation
rmw
0
490
Other Decks in Technology
See All in Technology
RAGの改善を速く回すための評価基盤
yosukeyoshida
6
2.8k
プロダクションコードにおける encoding/json から encoding/json/v2 へのスムーズな移行
sansantech
PRO
1
450
メール到達性を支える、リンク先URLのドメイン評価の扱い方
wind111
0
140
Biohub - Cell Tracking During Development 5th place solution
rist
0
170
ぼくのClaude Codeの使い方
falken
PRO
5
7.5k
ラクスル会社紹介資料|エンジニア向け / RAKSUL Introduction for Engineers
raksulrecruiting
0
130
BALLAS Technology Deck
ballas_inc
0
840
会社説明資料_最新版
demaecan
0
32k
Re:ゼロから始めるシェアハウスのペットな鯖
silmin_
0
240
Where Should Platform Complexity Live? Lessons from a Cross-Team PR Preview Platform
taiki45
0
140
人の努力に頼らないセキュリティをエンジニアリングする在り方 / An approach to engineering security that does not rely on human effort
carta_engineering
0
210
高品質と高スピードを支える品質のシフトレフトのアプローチ
goyoki
4
1.6k
Featured
See All Featured
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
Scaling GitHub
holman
464
140k
Six Lessons from altMBA
skipperchong
29
4.6k
Mobile First: as difficult as doing things right
swwweet
225
10k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
540
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
380
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.4k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
60k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
990
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.2k