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
360
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
180
Combine! All the things
riteshhh
3
690
Deep dive into Protocols
riteshhh
1
430
Thinking in Swift!
riteshhh
3
420
Other Decks in Programming
See All in Programming
AIと人間の共創開発!OSSで試行錯誤した開発スタイル
mae616
2
830
コードとあなたと私の距離 / The Distance Between Code, You, and I
hiro_y
0
210
iOSでSVG画像を扱う
kishikawakatsumi
0
170
NIKKEI Tech Talk#38
cipepser
0
320
Webサーバーサイド言語としてのRustについて
kouyuume
1
5k
ボトムアップの生成AI活用を推進する社内AIエージェント開発
aku11i
0
160
bootcamp2025_バックエンド研修_WebAPIサーバ作成.pdf
geniee_inc
0
140
Towards Transactional Buffering of CDC Events @ Flink Forward 2025 Barcelona Spain
hpgrahsl
0
120
Devvox Belgium - Agentic AI Patterns
kdubois
1
150
登壇は dynamic! な営みである / speech is dynamic
da1chi
0
390
Vueのバリデーション、結局どれを選べばいい? ― 自作バリデーションの限界と、脱却までの道のり ― / Which Vue Validation Library Should We Really Use? The Limits of Self-Made Validation and How I Finally Moved On
neginasu
2
1.7k
Ktorで簡単AIアプリケーション
tsukakei
0
120
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
190
55k
A designer walks into a library…
pauljervisheath
209
24k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
630
Build The Right Thing And Hit Your Dates
maggiecrowley
38
2.9k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
The Language of Interfaces
destraynor
162
25k
Building a Modern Day E-commerce SEO Strategy
aleyda
44
7.9k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Rails Girls Zürich Keynote
gr2m
95
14k
Documentation Writing (for coders)
carmenintech
75
5.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
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