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
How to be a POP-Star
Search
Ritesh Gupta
July 05, 2017
Programming
400
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
How to be a POP-Star
POP - Protocol Oriented Programming
Ritesh Gupta
July 05, 2017
More Decks by Ritesh Gupta
See All by Ritesh Gupta
Declarative Networking with Combine –– iOS Conf SG 2020
riteshhh
0
200
Combine! All the things
riteshhh
3
710
Deep dive into Protocols
riteshhh
1
460
Thinking in Swift!
riteshhh
3
450
Other Decks in Programming
See All in Programming
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
14
6.8k
The Bowling Game- From Imperative to Functional Programming - Part 1
philipschwarz
PRO
0
300
はてなアカウント基盤 State of the Union
cockscomb
1
1.3k
20260623_Loop Engineeringで自分の分身の問い合わせBotを作る
ryugen04
0
200
Embedded SREと共に達成した会員管理システムのAWS移行 - SRE NEXT 2026 ランチスポンサーセッション
niftycorp
PRO
1
2.1k
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
580
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
170
自作OSでスライド発表する
uyuki234
1
3.7k
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
500
関数型プログラミングのメリットって何だろう?
wanko_it
0
160
技術記事、 専門家としてのプログラマ、 言語化
mizchi
14
7.4k
フィードバックで育てるAI開発
kotaminato
1
110
Featured
See All Featured
Building an army of robots
kneath
306
46k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Ruling the World: When Life Gets Gamed
codingconduct
0
280
Large-scale JavaScript Application Architecture
addyosmani
515
110k
From π to Pie charts
rasagy
0
230
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
640
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
630
Accessibility Awareness
sabderemane
1
150
Git: the NoSQL Database
bkeepers
PRO
432
67k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
150
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
190
Making the Leap to Tech Lead
cromwellryan
135
10k
Transcript
how to be a POP-Star (Swift Chennai Meetup) ~ Ritesh
Gupta
/@_riteshhh /riteshhgupta /issues/295 /swift-snippets
None
None
`Protocol-Oriented Programming in Swift` https://developer.apple.com/videos/play/wwdc2015/408/ WWDC - 2015
`Protocol and Value Oriented Programming in UIKit Apps` https://developer.apple.com/videos/play/wwdc2016/419/ WWDC
- 2016
Swift is just not a syntax migration from Objective-C…
Swift is not objective-c styled language…
C ~> C++ Objective-C ~> Swift { imperative } {
object oriented } { object oriented } { protocol oriented }
Entity (class, struct - UI or Model) vs Behaviour (protocol)
Entity is collection of behaviours…
UIButton UIBarButtonItem
UIBarButtonItem UIBarItem NSObject UIButton UIControl UIView
UIBarButtonItem UIBarItem NSObject UIButton UIControl UIView
None
None
UIKit + Protocols
UIView Framable
UIImageView ImageRenderable, Framable
UIButton Tappable, ImageRenderable, Framable
compose everything with Protocols..
UITableViewCell UICollectionViewCell Reusable, Framable
UIScrollView Scrollable, Framable
UITableView UICollectionView Listable, Scrollable, Framable
thinking in protocol..
protocol ->
protocol -> protocol extension ->
protocol -> protocol extension -> protocol constrained extension ->
playground demos..
protocol is not a silver bullet.. http://chris.eidhof.nl/post/protocol-oriented-programming/
..computed variables, extensions, values types, immutability, functional programming, generics, enums,
associative types/ values..
None