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
Clean Up Your Views
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Luis Edimerchk Laverde
September 20, 2016
Programming
0
120
Clean Up Your Views
Slides for my talk in Medellin.rb
Luis Edimerchk Laverde
September 20, 2016
Tweet
Share
More Decks by Luis Edimerchk Laverde
See All by Luis Edimerchk Laverde
Refactoring a Rails API
edymerchk
0
210
Aplicaciones Web utilizando Ruby on Rails
edymerchk
0
55
Testing like gods
edymerchk
1
130
Other Decks in Programming
See All in Programming
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
並行開発のためのコードレビュー
miyukiw
0
170
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
380
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
240
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
CSC307 Lecture 08
javiergs
PRO
0
670
Architectural Extensions
denyspoltorak
0
290
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
Basic Architectures
denyspoltorak
0
680
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
Featured
See All Featured
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
100
AI Search: Where Are We & What Can We Do About It?
aleyda
0
6.9k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Typedesign – Prime Four
hannesfritz
42
2.9k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
The SEO Collaboration Effect
kristinabergwall1
0
350
Practical Orchestrator
shlominoach
191
11k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
For a Future-Friendly Web
brad_frost
182
10k
Tell your own story through comics
letsgokoyo
1
810
Designing for Performance
lara
610
70k
Transcript
CLEAN UP YOUR VIEWS @edymerchk
LUIS EDYMERCHK LAVERDE
None
None
BUT…
rails-api
RAILS VIEWS
None
EXAMPLE 1. Reviewed at : August 18, 2016 2. Reviewed
at : No Reviewed yet
None
HELPERS TO THE RESCUE
None
HELPERS… ➤ Global Namespace ➤ Object-disoriented functions ➤ Helpers are
modules ➤ Called without an obvious receiver
Helpers
MODEL METHODS TO THE RESCUE
None
DESIGNS PATTERNS
“ Design pattern is a general reusable solution to a
commonly occurring problem within a given context
Module Mediator Facade Factory Chain Memento Visitor Abstract Broker Builder
Iterator Proxy Decorator Strategy Prototype Observer Template Active Record Composite Command Data transfer object MVC Singleton Reactor GRASP
DECORATOR
“ The decorator is a design pattern that allows behavior
to be added to an individual object, either statically or dynamically,Type a quote here. -wikipedia
DECORATOR IN RAILS
“ mkdir app/decorators touch app/decorators/object_decorator.rb
None
None
None
None
BENEFITS ➤ Flexibility ➤ Organization & Readability ➤ Testing!!! ➤
Open Close Principle ➤ Split logic
DRAPER
THANKS!!