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
Clean Up Your Views
Search
Luis Edimerchk Laverde
September 20, 2016
Programming
140
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Clean Up Your Views
Slides for my talk in Medellin.rb
Luis Edimerchk Laverde
September 20, 2016
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
58
Testing like gods
edymerchk
1
140
Other Decks in Programming
See All in Programming
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
3
550
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
4
3.2k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
490
海上で動くGoサーバー: goroutineとchannelでさばく航行データストリーム
atsuki_seo
0
840
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
5
3.2k
iOSDC2026登壇資料.pdf
riofujimon
0
170
すこし踏み込む CancellationToken
htkym
2
690
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
230
setup-vp GitLab対応の裏側
naokihaba
0
120
Heart of Swift Concurrency
koher
0
940
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
2.2k
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
2.4k
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
331
22k
Odyssey Design
rkendrick25
PRO
2
810
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
850
Un-Boring Meetings
codingconduct
0
420
How to train your dragon (web standard)
notwaldorf
97
6.8k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
260
The Curious Case for Waylosing
cassininazir
1
520
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
700
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
670
Amusing Abliteration
ianozsvald
1
310
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
710
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!!