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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Ritesh Gupta
July 05, 2017
Programming
1
380
How to be a POP-Star
POP - Protocol Oriented Programming
Ritesh Gupta
July 05, 2017
Tweet
Share
More Decks by Ritesh Gupta
See All by Ritesh Gupta
Declarative Networking with Combine –– iOS Conf SG 2020
riteshhh
0
190
Combine! All the things
riteshhh
3
700
Deep dive into Protocols
riteshhh
1
450
Thinking in Swift!
riteshhh
3
440
Other Decks in Programming
See All in Programming
Event Storming
hschwentner
3
1.3k
nilとは何か 〜interfaceの構造とnil!=nilから理解する〜
kuro_kurorrr
3
1.6k
AHC061解説
shun_pi
0
300
今更考える「単一責任原則」 / Thinking about the Single Responsibility Principle
tooppoo
3
1.3k
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
TROCCOで実現するkintone+BigQueryによるオペレーション改善
ssxota
0
120
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
120
PJのドキュメントを全部Git管理にしたら、一番喜んだのはAIだった
nanaism
0
230
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
190
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
490
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
290
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
150
Featured
See All Featured
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
330
Color Theory Basics | Prateek | Gurzu
gurzu
0
220
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
230
Done Done
chrislema
186
16k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
63
53k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
117
110k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.1k
Agile that works and the tools we love
rasmusluckow
331
21k
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