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
250
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
140
Combine! All the things
riteshhh
3
660
Deep dive into Protocols
riteshhh
1
280
Thinking in Swift!
riteshhh
3
320
Other Decks in Programming
See All in Programming
SIMD Parallel Programming with the Vector API
josepaumard
0
170
VS Code をプロダクトにどう取り込むか
onomax
1
360
Git Lint
bkuhlmann
4
750
"config" ってなんだ? / What is "config"?
okashoi
0
240
educure_カリキュラム生操作マニュアル.pdf
linew_official
0
790
Rethinking UI building strategies @ SFI 2024
letelete
0
270
GitHub Actionsで泣かないためにやっておきたい設定 / Recommended GHA settings to avoid crying
pinkumohikan
3
530
効率化に挑戦してみたらモバイル開発が少し快適になった話
ryunakayama
0
130
『Railsオワコン』と言われる時代に、なぜブルーモ証券はRailsを選ぶのか
free_world21
0
200
Hanami and htmx
bkuhlmann
0
210
Amazon SQSコンシューマー疎結合への旅 - 出張! #DevelopersIO IT技術ブログの中の人が語る勉強会 #3
quiver
0
270
Rubyでたのしむクリエイティブコーディング/Enjoy Creative coding with Ruby
chobishiba
1
180
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
266
19k
Visualization
eitanlees
136
14k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
226
51k
Making Projects Easy
brettharned
108
5.5k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
155
14k
Bash Introduction
62gerente
604
210k
Code Reviewing Like a Champion
maltzj
514
39k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
78
42k
Happy Clients
brianwarren
92
6.4k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
18
6.9k
4 Signs Your Business is Dying
shpigford
175
21k
From Idea to $5000 a Month in 5 Months
shpigford
377
45k
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