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
320
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
390
Thinking in Swift!
riteshhh
3
380
Other Decks in Programming
See All in Programming
DMMオンラインサロンアプリのSwift化
hayatan
0
270
SpringBoot3.4の構造化ログ #kanjava
irof
2
780
知られざるDMMデータエンジニアの生態 〜かつてツチノコと呼ばれし者〜
takaha4k
3
1.1k
振り返れば奴(Cline)がいる
keiyagi
0
130
DevFest - Serverless 101 with Google Cloud Functions
tunmise
0
140
GitHub CopilotでTypeScriptの コード生成するワザップ
starfish719
28
6.1k
オニオンアーキテクチャを使って、 Unityと.NETでコードを共有する
soi013
0
390
Flatt Security XSS Challenge 解答・解説
flatt_security
0
1.1k
ESLintプラグインを使用してCDKのセオリーを適用する
yamanashi_ren01
2
380
ASP. NET CoreにおけるWebAPIの最新情報
tomokusaba
0
200
ecspresso, ecschedule, lambroll を PipeCDプラグインとして動かしてみた (プロトタイプ) / Running ecspresso, ecschedule, and lambroll as PipeCD Plugins (prototype)
tkikuc
2
2.3k
ErdMap: Thinking about a map for Rails applications
makicamel
1
1.1k
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
600
Git: the NoSQL Database
bkeepers
PRO
427
64k
How GitHub (no longer) Works
holman
312
140k
Unsuck your backbone
ammeep
669
57k
RailsConf 2023
tenderlove
29
980
4 Signs Your Business is Dying
shpigford
182
22k
Fireside Chat
paigeccino
34
3.2k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Thoughts on Productivity
jonyablonski
68
4.4k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Code Reviewing Like a Champion
maltzj
521
39k
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