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
Railsバージョンを4倍にした話
optim
0
400
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5.2k
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
270
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5.1k
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
230
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
290
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
120
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.6k
Next.js: The final boss of Web Performance
guaca
0
260
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
930
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
180
Featured
See All Featured
Skip the Path - Find Your Career Trail
mkilby
1
260
Music & Morning Musume
bryan
48
7.4k
Optimising Largest Contentful Paint
csswizardry
37
4k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
360
The Cult of Friendly URLs
andyhume
79
7k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
530
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
630
30 Presentation Tips
portentint
PRO
1
430
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!!