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
zezzi
December 11, 2017
Technology
0
53
Protocol Oriented Programming
zezzi
December 11, 2017
Tweet
Share
More Decks by zezzi
See All by zezzi
Swiftlint
zezzi
0
74
Kotlin & Swift
zezzi
1
87
Angular JS
zezzi
0
270
WTM Google Glass 2014
zezzi
2
900
WTMLima 2014
zezzi
0
130
Other Decks in Technology
See All in Technology
United Airlines Customer Service– Call 1-833-341-3142 Now!
airhelp
0
170
開発生産性を組織全体の「生産性」へ! 部門間連携の壁を越える実践的ステップ
sudo5in5k
2
7.2k
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
27k
What’s new in Android development tools
yanzm
0
320
React開発にStorybookとCopilotを導入して、爆速でUIを編集・確認する方法
yu_kod
1
280
第4回Snowflake 金融ユーザー会 Snowflake summit recap
tamaoki
1
290
SaaS型なのに自由度の高い本格CMSでサイト構築と運用のコスパ&タイパUP! MovableType.net の便利機能とユーザー事例のご紹介
masakah
0
110
AWS認定を取る中で感じたこと
siromi
1
190
American airlines ®️ USA Contact Numbers: Complete 2025 Support Guide
airhelpsupport
0
390
KubeCon + CloudNativeCon Japan 2025 Recap by CA
ponkio_o
PRO
0
300
SEQUENCE object comparison - db tech showcase 2025 LT2
nori_shinoda
0
150
赤煉瓦倉庫勉強会「Databricksを選んだ理由と、絶賛真っ只中のデータ基盤移行体験記」
ivry_presentationmaterials
2
370
Featured
See All Featured
Facilitating Awesome Meetings
lara
54
6.4k
Rails Girls Zürich Keynote
gr2m
95
14k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Into the Great Unknown - MozCon
thekraken
40
1.9k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
How STYLIGHT went responsive
nonsquared
100
5.6k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
Why Our Code Smells
bkeepers
PRO
336
57k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Faster Mobile Websites
deanohume
307
31k
What's in a price? How to price your products and services
michaelherold
246
12k
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