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
220
Aplicaciones Web utilizando Ruby on Rails
edymerchk
0
59
Testing like gods
edymerchk
1
140
Other Decks in Programming
See All in Programming
AmebaブログはKMPから卒業します
kmars0605
0
330
Event is what happens
moro
2
3.8k
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
230
オーケストレーション記述言語 Katari
yukikurage
0
240
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
250
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
2.2k
社内AIエージェント「Askワンバン」における コストチューニングの取り組み
t0yohei
0
160
Moscow Python Meetup №112. Как поселить ИИ агентов в event driven архитектуре
moscowdjango
PRO
0
110
Rails初心者がパスキーを実装してみて大変だったこと
ktombow
0
150
ActionController meets Protocol Buffers
sorah
1
790
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
280
Next.js: The final boss of Web Performance
guaca
0
380
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
50
15k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
560
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
280
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.8k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
380
Accessibility Awareness
sabderemane
1
290
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
Docker and Python
trallard
47
4.3k
Designing for humans not robots
tammielis
254
26k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
New Earth Scene 8
popppiees
4
2.8k
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!!