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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Ritesh Gupta
July 05, 2017
Programming
400
1
Share
How to be a POP-Star
POP - Protocol Oriented Programming
Ritesh Gupta
July 05, 2017
More Decks by Ritesh Gupta
See All by Ritesh Gupta
Declarative Networking with Combine –– iOS Conf SG 2020
riteshhh
0
200
Combine! All the things
riteshhh
3
700
Deep dive into Protocols
riteshhh
1
460
Thinking in Swift!
riteshhh
3
450
Other Decks in Programming
See All in Programming
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
700
Transactional Change Stream Processing With Debezium and Apache Flink
gunnarmorling
1
160
RTSPクライアントを自作してみた話
simotin13
0
430
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.1k
Lessons from Spec-Driven Development
simas
PRO
0
120
TypeSpec で繋ぐ複数プロダクトの型安全
maroon8021
1
330
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
190
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.5k
OSもどきOS
arkw
0
390
dRuby over BLE
makicamel
2
290
ふつうのFeature Flag実践入門
irof
7
3.5k
Modding RubyKaigi for Myself
yui_knk
0
870
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
550
Agile that works and the tools we love
rasmusluckow
331
21k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
280
Evolving SEO for Evolving Search Engines
ryanjones
0
210
Heart Work Chapter 1 - Part 1
lfama
PRO
7
36k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
190
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
How STYLIGHT went responsive
nonsquared
100
6.2k
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