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
410
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
710
Deep dive into Protocols
riteshhh
1
470
Thinking in Swift!
riteshhh
3
460
Other Decks in Programming
See All in Programming
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
4.3k
【DroidKaigi 2026】「アクセシビリティを利用するとき、 アクセシビリティもまたこちらを利用している」 〜マルウェアによる攻撃と防衛について〜
halunoyo
0
390
FastAPI の並行処理モデルを完全に理解する
hoto17296
9
3.8k
高専キャリア LT 発表内容
crysta1221
6
5.5k
PyO3 で既存 Python 評価器を Rust core 化する ー wasm-bindgen でブラウザにも配るための設計
kdash
1
420
コンパウンドプロダクト開発のためのローカルプロセスマネージャー再発明 #layerxgo
izumin5210
0
640
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
110
From 6 People Classroom Meetup to 100 People Regional Conference / FOSS4G Hiroshima 2026
furukawayasuto
0
110
ソフトウェアエンジニアにとっての生成AI - 特性を知って使い倒す / generative ai for software enginner
kishida
7
2.3k
Oxlintはいいぞ(続)
yug1224
1
550
[KotlinConf Extended South Korea 2026] KotlinConf 2026 발표자 후기
wisemuji
0
100
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
260
Featured
See All Featured
Music & Morning Musume
bryan
47
7.4k
A Modern Web Designer's Workflow
chriscoyier
698
190k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
570
Product Roadmaps are Hard
iamctodd
55
13k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
560
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
490
We Have a Design System, Now What?
morganepeng
55
8.3k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
So, you think you're a good person
axbom
PRO
2
2.1k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Google's AI Overviews - The New Search
badams
0
1.6k
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