Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
How to be a POP-Star
Ritesh Gupta
July 05, 2017
Programming
1
160
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
95
Combine! All the things
riteshhh
3
590
Deep dive into Protocols
riteshhh
1
180
Thinking in Swift!
riteshhh
3
240
Other Decks in Programming
See All in Programming
Glance App Widgetでウィジェットを作ろう / MoT TechTalk #15
mot_techtalk
0
150
Why Money Forward contributes to Ruby and RubyKaigi?
luccafort
0
230
TypeScript 4.9のas const satisfiesが便利
tonkotsuboy_com
9
2.3k
(新米)エンジニアリングマネージャーのしごと #RSGT2023
murabayashi
9
6k
WordPress(再)入門 - 基礎知識・環境編
oleindesign
1
140
Git Rebase
bkuhlmann
10
1.2k
Hatena Engineer Seminar #23「新卒研修で気軽に『ありがとう』を伝え合える Slack アプリを開発した話」
slashnephy
0
410
Next.js 13 Layout / Streaming SSR 仕組み解説
sumiren
0
200
AWSとCPUのムフフな関係
cmdemura
0
480
The State of Kotlin | FOSDEM 2023
prof18
1
110
ipa-medit: Memory search and patch tool for IPA without Jailbreaking/ipa-medit-bh2022-europe
tkmru
0
130
Gradle build: The time is now
nonews
1
500
Featured
See All Featured
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
101
6.2k
Side Projects
sachag
451
37k
Thoughts on Productivity
jonyablonski
49
2.7k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
13
5.5k
Building Adaptive Systems
keathley
27
1.3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
236
1.1M
How to name files
jennybc
47
73k
Producing Creativity
orderedlist
PRO
335
38k
How GitHub Uses GitHub to Build GitHub
holman
465
280k
A Tale of Four Properties
chriscoyier
149
21k
The Straight Up "How To Draw Better" Workshop
denniskardys
226
130k
Optimizing for Happiness
mojombo
365
64k
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