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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
Grafana:建立系統全知視角的捷徑
blueswen
0
330
Apache Iceberg V3 and migration to V3
tomtanaka
0
160
CSC307 Lecture 08
javiergs
PRO
0
670
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
230
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
220
Fragmented Architectures
denyspoltorak
0
160
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
180
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
190
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
CSC307 Lecture 03
javiergs
PRO
1
490
Basic Architectures
denyspoltorak
0
680
Featured
See All Featured
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
GitHub's CSS Performance
jonrohan
1032
470k
New Earth Scene 8
popppiees
1
1.5k
Docker and Python
trallard
47
3.7k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
78
Abbi's Birthday
coloredviolet
1
4.7k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
66
37k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
130
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
160
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!!