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
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
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.1k
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
170
今から始めるClaude Code超入門
448jp
8
8.8k
並行開発のためのコードレビュー
miyukiw
0
170
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
AI巻き込み型コードレビューのススメ
nealle
1
290
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
580
CSC307 Lecture 03
javiergs
PRO
1
490
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.4k
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
5
460
Featured
See All Featured
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
50
Darren the Foodie - Storyboard
khoart
PRO
2
2.4k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
A better future with KSS
kneath
240
18k
Exploring anti-patterns in Rails
aemeredith
2
250
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
340
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
Scaling GitHub
holman
464
140k
First, design no harm
axbom
PRO
2
1.1k
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
Abbi's Birthday
coloredviolet
1
4.7k
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!!