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
Protocol Oriented Programming
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
zezzi
December 11, 2017
Technology
66
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Protocol Oriented Programming
zezzi
December 11, 2017
More Decks by zezzi
See All by zezzi
Swiftlint
zezzi
0
96
Kotlin & Swift
zezzi
1
100
Angular JS
zezzi
0
280
WTM Google Glass 2014
zezzi
2
920
WTMLima 2014
zezzi
0
140
Other Decks in Technology
See All in Technology
巨大気象データと戦う ― サロゲートモデル学習を高速化する圧縮技術
gpuunite_official
0
170
LanceDB入門
mocobeta
9
630
Digitization部 紹介資料
sansan33
PRO
2
7.7k
AI-DLC実践録_フルサイクル開発への挑戦
miyuc
0
310
Oracle MCP Servers Explained
thatjeffsmith
0
290
【GCC2026】鉄拳8でのVFX開発事例
bandainamcostudios
PRO
0
120
AI時代に、人は何を、どう学ぶのか #pbl_pub / What and How Do We Learn in the AI Era?
takaking22
1
180
その“隠したつもり”が命取り ── 自前と平文をやめて「正解」に委ねる
kuroneko13
0
130
SO-101×VLAによる3色キューブのピック&プレース
abeja
0
220
まちスペース®とデジタルツインと「まちづくり」
hiro_ogi
0
130
属人化を叩き割れ!「制作加速」と「安定化」の矛盾を打破する:8年目プロダクトが辿り着いた「ミスが起こり得ない」アセット制作フローの全貌
gree_tech
PRO
0
120
2027年のMetricKit
kantacky
0
130
Featured
See All Featured
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
800
Everyday Curiosity
cassininazir
0
290
Building Adaptive Systems
keathley
44
3.2k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.4k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
270
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
170
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
Practical Orchestrator
shlominoach
191
12k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
370
Transcript
PROTOCOL ORIENTED PROGRAMMING
TEXT OBJECT ORIENTED PROGRAMMING ▸ Object Oriented Programming: Design is
focused on Objects. ▸ Interfaces: Are a contract of what needs to be implemented. And are used as a way to achieve polymorphism. They are a back seat.
TEXT DOG EXAMPLE
TEXT DOG EXAMPLE Code Duplication
TEXT DOG EXAMPLE German Shepard is not a service
dog Pug does not sniff Drugs
TEXT DOG CLASS SERVICE DOG SECURITY DOG PASTOR ALEMAN LABRADOR
TEXT DOG CLASS SERVICE DOG SECURITY DOG PASTOR ALEMAN LABRADOR
TEXT PROTOCOL ORIENTED PROGRAMMING DOGS EXAMPLE
TEXT PROTOCOL ORIENTED PROGRAMMING DOGS EXAMPLE
TEXT DOG PROTOCOL DOG PROTOCOL EXTENSION SERVICE DOG PROTOCOL SECURITY
DOG PROTOCOL PASTOR ALEMAN LABRADOR SERVICE DOG PROTOCOL EXTENSION SERVICE DOG PROTOCOL EXTENSION
TEXT IMPLICIT SHARING
TEXT INHERITANCE TO INTRUSIVE ▸ 1 super class ▸ Bloating
your super class ▸ Changes can become difficult when inheritance is over used.
TEXT WHY? ▸ Why do we want to use protocols?
TEXT PROTOCOLS ▸ The “I” in SOLID ▸ No client
should depend on (or know about) methods it does not use ▸ Makes code modular ▸ Testable ▸ Small separated interfaces == focused API ▸ Restrict access
TEXT PROTOCOL SYNTAX, INHERITANCE, COMPOSITION
DAY TO DAY PROTOCOL USAGE
TEXT
TEXT
TEXT
TEXT
TEXT
TEXT
TEXT
TEXT
TEXT
TEXT
OTHER AREAS CORE DATA
TEXT
TEXT
TEXT VALIDATION
TEXT
TEXT
TEXT