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
一休.com のログイン体験を支える技術 〜Web Components x Vue.js 活用事例と最適化について〜
atsumim
0
110
【PHP】破壊的バージョンアップと戦った話〜決断と説得
satoshi256kbyte
0
120
Linux && Docker 研修/Linux && Docker training
forrep
23
4.5k
Lottieアニメーションをカスタマイズしてみた
tahia910
0
120
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
730
AWS Organizations で実現する、 マルチ AWS アカウントのルートユーザー管理からの脱却
atpons
0
130
Formの複雑さに立ち向かう
bmthd
1
720
パスキーのすべて ── 導入・UX設計・実装の紹介 / 20250213 パスキー開発者の集い
kuralab
3
670
第3回関東Kaggler会_AtCoderはKaggleの役に立つ
chettub
3
890
WebDriver BiDiとは何なのか
yotahada3
1
140
AWS Lambda functions with C# 用の Dev Container Template を作ってみた件
mappie_kochi
0
240
iOSエンジニアから始める visionOS アプリ開発
nao_randd
3
120
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
98
5.3k
Bash Introduction
62gerente
610
210k
Fireside Chat
paigeccino
34
3.2k
The Cost Of JavaScript in 2023
addyosmani
47
7.3k
Building an army of robots
kneath
302
45k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
99
18k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.4k
For a Future-Friendly Web
brad_frost
176
9.5k
Optimising Largest Contentful Paint
csswizardry
34
3.1k
Designing for humans not robots
tammielis
250
25k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
20
2.4k
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