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
350
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
180
Combine! All the things
riteshhh
3
690
Deep dive into Protocols
riteshhh
1
430
Thinking in Swift!
riteshhh
3
410
Other Decks in Programming
See All in Programming
MCPでVibe Working。そして、結局はContext Eng(略)/ Working with Vibe on MCP And Context Eng
rkaga
5
2.2k
速いWebフレームワークを作る
yusukebe
5
1.7k
TDD 実践ミニトーク
contour_gara
1
290
Go言語での実装を通して学ぶLLMファインチューニングの仕組み / fukuokago22-llm-peft
monochromegane
0
120
Cache Me If You Can
ryunen344
1
380
Navigating Dependency Injection with Metro
zacsweers
2
160
Azure SRE Agentで運用は楽になるのか?
kkamegawa
0
1.8k
Ruby×iOSアプリ開発 ~共に歩んだエコシステムの物語~
temoki
0
270
Claude Codeで挑むOSSコントリビュート
eycjur
0
200
Kiroの仕様駆動開発から見えてきたAIコーディングとの正しい付き合い方
clshinji
1
210
テストコードはもう書かない:JetBrains AI Assistantに委ねる非同期処理のテスト自動設計・生成
makun
0
180
AWS発のAIエディタKiroを使ってみた
iriikeita
1
180
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
55
13k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.5k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Code Reviewing Like a Champion
maltzj
525
40k
Thoughts on Productivity
jonyablonski
70
4.8k
Fireside Chat
paigeccino
39
3.6k
Navigating Team Friction
lara
189
15k
Making Projects Easy
brettharned
117
6.4k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
Statistics for Hackers
jakevdp
799
220k
A Tale of Four Properties
chriscoyier
160
23k
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