$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Clean Up Your Views
Search
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
54
Testing like gods
edymerchk
1
130
Other Decks in Programming
See All in Programming
脳の「省エネモード」をデバッグする ~System 1(直感)と System 2(論理)の切り替え~
panda728
PRO
0
120
Cell-Based Architecture
larchanjo
0
140
Combinatorial Interview Problems with Backtracking Solutions - From Imperative Procedural Programming to Declarative Functional Programming - Part 2
philipschwarz
PRO
0
110
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
120
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
150
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
280
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
310
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
0
270
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
2
570
実はマルチモーダルだった。ブラウザの組み込みAI🧠でWebの未来を感じてみよう #jsfes #gemini
n0bisuke2
3
1.3k
俺流レスポンシブコーディング 2025
tak_dcxi
14
9.5k
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
890
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
432
66k
The Spectacular Lies of Maps
axbom
PRO
1
400
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.4k
Paper Plane (Part 1)
katiecoart
PRO
0
1.9k
Being A Developer After 40
akosma
91
590k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Docker and Python
trallard
47
3.7k
Faster Mobile Websites
deanohume
310
31k
A Tale of Four Properties
chriscoyier
162
23k
SEO for Brand Visibility & Recognition
aleyda
0
4.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
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!!