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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
人間+AIを「チーム」としてプロセスを再設計する
littlehands
4
3.4k
ラクスル会社紹介資料|エンジニア向け / RAKSUL Introduction for Engineers
raksulrecruiting
0
130
IoTのデータ保存をSREの観点で考える
grimoh
1
110
個人ASを取得して、自宅Kubernetes上のVMをグローバルIPで公開した話
munenick
0
180
Agent Harnessはどう作る?事例から学ぶAI Agentの設計思想
sergicalsix
0
340
Gov-JAWS#9 統合監視機能のマネージドサービス化+AIによる障害時自動調査
fj_yoshimura_kosuke
0
190
E2E Test というハーネス — AI時代の自動テスト民主化
daishukojima
10
5.4k
[NW-JAWS DAY]「うちのAWS、インターネット出られないんで」― AWS外の自社サービスをPrivateLinkでシュッと公開する方法
ykimi
3
810
自動計装なしでECSサービスをApplication Signalsに載せるまで
ota1022
2
290
おうち環境でも「なるべく止めたくない!」 ― おうち環境の機器冗長化の理想と現実
yuutosi
1
580
Biohub - Cell Tracking During Development 5th place solution
rist
0
170
田んぼの見回りをIoTで減らしたい!水位監視から電池駆動カメラまでの試行錯誤
itosoft
1
260
Featured
See All Featured
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.3k
The Invisible Side of Design
smashingmag
301
52k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
330
Designing for Timeless Needs
cassininazir
1
560
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
2k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
460
We Have a Design System, Now What?
morganepeng
55
8.4k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
680
Claude Code のすすめ
schroneko
67
230k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k