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
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
OTP を自動で入力する裏技
megabitsenmzq
0
120
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
960
Vuetify 3 → 4 何が変わった?差分と移行ポイント10分まとめ
koukimiura
0
180
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
1.1k
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
150
KagglerがMixSeekを触ってみた
morim
0
140
Angular-Apps smarter machen mit Gen AI: Lokal und offlinefähig - Hands-on Workshop!
christianliebel
PRO
0
130
How to stabilize UI tests using XCTest
akkeylab
0
140
CSC307 Lecture 15
javiergs
PRO
0
260
CS教育のDX AIによる育成の効率化
niftycorp
PRO
0
160
Fundamentals of Software Engineering In the Age of AI
therealdanvega
2
290
安いハードウェアでVulkan
fadis
1
770
Featured
See All Featured
How to Talk to Developers About Accessibility
jct
2
160
Amusing Abliteration
ianozsvald
0
140
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
980
What does AI have to do with Human Rights?
axbom
PRO
1
2k
HDC tutorial
michielstock
1
580
Git: the NoSQL Database
bkeepers
PRO
432
67k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Navigating Weather and Climate Data
rabernat
0
140
Rails Girls Zürich Keynote
gr2m
96
14k
The SEO identity crisis: Don't let AI make you average
varn
0
420
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
250
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