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
48
Protocol Oriented Programming
zezzi
December 11, 2017
Tweet
Share
More Decks by zezzi
See All by zezzi
Swiftlint
zezzi
0
52
Kotlin & Swift
zezzi
1
77
Angular JS
zezzi
0
260
WTM Google Glass 2014
zezzi
2
880
WTMLima 2014
zezzi
0
120
Other Decks in Technology
See All in Technology
非同期推論システムによるコスト削減と信頼性向上
koki_nishihara
1
360
LayerXにおけるLLMプロダクト開発の今までとこれから
layerx
PRO
3
600
Babylon.jsと色々なものを組み合わせる:ブラウザのAPIやガジェットや2D描画ライブラリなど / Babylon.js 勉強会 vol.3
you
PRO
0
160
Azureの基本的な権限管理の勉強会
yhana
1
2k
どうするコスト最適化のトレードオフ
tetsuyaooooo
1
710
リテール金融(キャッシュレス・ネット銀行・ネット証券)の競争環境と経済圏
8maki
0
1.5k
Microsoft for Startups Founders Hub_20240429 update
daikikanemitsu
1
2.4k
自己改善からチームを動かす! 「セルフエンジニアリングマネージャー」のすゝめ
shoota
6
1k
チームでロジカルシンキングに改めて向き合っている話 〜学習環境と実践⽅法〜
sansantech
PRO
3
3.2k
Cracking the KubeCon CfP
inductor
2
270
今年のRubyKaigiはProfiler Year🤘
osyoyu
0
350
KubeConにproposalを送りたい人へのアドバイス
sat
PRO
3
270
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
61
5k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
79
43k
Raft: Consensus for Rubyists
vanstee
133
6.3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
242
1.2M
Visualization
eitanlees
137
14k
Building Adaptive Systems
keathley
32
1.9k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
275
13k
Statistics for Hackers
jakevdp
790
220k
The Straight Up "How To Draw Better" Workshop
denniskardys
228
130k
The MySQL Ecosystem @ GitHub 2015
samlambert
244
12k
Building an army of robots
kneath
300
41k
Why Our Code Smells
bkeepers
PRO
331
56k
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