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
49
Protocol Oriented Programming
zezzi
December 11, 2017
Tweet
Share
More Decks by zezzi
See All by zezzi
Swiftlint
zezzi
0
61
Kotlin & Swift
zezzi
1
82
Angular JS
zezzi
0
260
WTM Google Glass 2014
zezzi
2
890
WTMLima 2014
zezzi
0
120
Other Decks in Technology
See All in Technology
Introduction to Works of ML Engineer in LY Corporation
lycorp_recruit_jp
0
140
CDCL による厳密解法を採用した MILP ソルバー
imai448
3
160
Flutterによる 効率的なAndroid・iOS・Webアプリケーション開発の事例
recruitengineers
PRO
0
120
ノーコードデータ分析ツールで体験する時系列データ分析超入門
negi111111
0
420
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
170
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
2
330
AGIについてChatGPTに聞いてみた
blueb
0
130
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
320
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
520
Taming you application's environments
salaboy
0
200
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
110
Security-JAWS【第35回】勉強会クラウドにおけるマルウェアやコンテンツ改ざんへの対策
4su_para
0
180
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
What's in a price? How to price your products and services
michaelherold
243
12k
Visualization
eitanlees
145
15k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
110
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
900
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Docker and Python
trallard
40
3.1k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
Documentation Writing (for coders)
carmenintech
65
4.4k
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