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
52
Protocol Oriented Programming
zezzi
December 11, 2017
Tweet
Share
More Decks by zezzi
See All by zezzi
Swiftlint
zezzi
0
66
Kotlin & Swift
zezzi
1
83
Angular JS
zezzi
0
260
WTM Google Glass 2014
zezzi
2
890
WTMLima 2014
zezzi
0
130
Other Decks in Technology
See All in Technology
TAMとre:Capセキュリティ編 〜拡張脅威検出デモを添えて〜
fujiihda
1
180
なぜ私は自分が使わないサービスを作るのか? / Why would I create a service that I would not use?
aiandrox
0
510
Datadog APM におけるトレース収集の流れ及び Retention Filters のはなし / datadog-apm-trace-retention-filters
k6s4i53rx
0
330
自動テストの世界に、この5年間で起きたこと
autifyhq
10
8.1k
現場の種を事業の芽にする - エンジニア主導のイノベーションを事業戦略に装着する方法 -
kzkmaeda
2
1.8k
技術負債の「予兆検知」と「状況異変」のススメ / Technology Dept
i35_267
1
1k
管理者しか知らないOutlookの裏側のAIを覗く#AzureTravelers
hirotomotaguchi
2
320
Developer Summit 2025 [14-D-1] Yuki Hattori
yuhattor
19
5.8k
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
6
57k
Amazon S3 Tablesと外部分析基盤連携について / Amazon S3 Tables and External Data Analytics Platform
nttcom
0
120
Postmanを使いこなす!2025年ぜひとも押さえておきたいPostmanの10の機能
nagix
2
140
次世代KYC活動報告 / 20250219-BizDay17-KYC-nextgen
oidfj
0
150
Featured
See All Featured
Practical Orchestrator
shlominoach
186
10k
For a Future-Friendly Web
brad_frost
176
9.5k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Embracing the Ebb and Flow
colly
84
4.6k
Automating Front-end Workflow
addyosmani
1367
200k
How GitHub (no longer) Works
holman
313
140k
Designing Experiences People Love
moore
139
23k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
29
2.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
Unsuck your backbone
ammeep
669
57k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
Optimising Largest Contentful Paint
csswizardry
34
3.1k
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