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
1
310
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
170
Combine! All the things
riteshhh
3
680
Deep dive into Protocols
riteshhh
1
380
Thinking in Swift!
riteshhh
3
380
Other Decks in Programming
See All in Programming
.NETでOBS Studio操作してみたけど…… / Operating OBS Studio by .NET
skasweb
0
130
chibiccをCILに移植した結果 (NGK2025S版)
kekyo
PRO
0
160
ATDDで素早く安定した デリバリを実現しよう!
tonnsama
1
2.1k
Lookerは可視化だけじゃない。UIコンポーネントもあるんだ!
ymd65536
1
130
混沌とした例外処理とエラー監視に秩序をもたらす
morihirok
15
2.5k
Rubyでつくるパケットキャプチャツール
ydah
0
210
最近のVS Codeで気になるニュース 2025/01
74th
1
200
DevFest - Serverless 101 with Google Cloud Functions
tunmise
0
140
ecspresso, ecschedule, lambroll を PipeCDプラグインとして動かしてみた (プロトタイプ) / Running ecspresso, ecschedule, and lambroll as PipeCD Plugins (prototype)
tkikuc
2
2k
Amazon Nova Reelの可能性
hideg
0
230
Simple組み合わせ村から大都会Railsにやってきた俺は / Coming to Rails from the Simple
moznion
3
2.8k
為你自己學 Python
eddie
0
530
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
5
210
YesSQL, Process and Tooling at Scale
rocio
170
14k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
20
2.4k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
39
1.9k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Being A Developer After 40
akosma
89
590k
Embracing the Ebb and Flow
colly
84
4.5k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
30
2.1k
The Cult of Friendly URLs
andyhume
78
6.1k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.4k
Documentation Writing (for coders)
carmenintech
67
4.5k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
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