Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
How to be a POP-Star by Ritesh at SwiftChennai-4
Search
Swift India
April 29, 2017
Programming
0
67
How to be a POP-Star by Ritesh at SwiftChennai-4
Protocol Oriented Programming
Swift India
April 29, 2017
Tweet
Share
More Decks by Swift India
See All by Swift India
Network Layer Abstraction
swiftindia
0
170
Efficient JSON to Object Parsing
swiftindia
0
150
Sign In with Apple
swiftindia
0
140
Furlenco's AR Journey
swiftindia
0
130
Image processing using Core Image and Metal
swiftindia
0
220
Combine - Diving into Apple’s Reactive Programming
swiftindia
1
250
Social in Hotstar
swiftindia
0
250
Improving App Launch Time
swiftindia
1
120
Backend Driven UIs
swiftindia
0
140
Other Decks in Programming
See All in Programming
AIコードレビューがチームの"文脈"を 読めるようになるまで
marutaku
0
350
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
120
Why Kotlin? 電子カルテを Kotlin で開発する理由 / Why Kotlin? at Henry
agatan
2
6.9k
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
140
TypeScriptで設計する 堅牢さとUXを両立した非同期ワークフローの実現
moeka__c
6
3k
20 years of Symfony, what's next?
fabpot
2
340
sbt 2
xuwei_k
0
250
30分でDoctrineの仕組みと使い方を完全にマスターする / phpconkagawa 2025 Doctrine
ttskch
3
790
認証・認可の基本を学ぼう後編
kouyuume
0
180
ソフトウェア設計の課題・原則・実践技法
masuda220
PRO
26
22k
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
5
1.9k
Microservices rules: What good looks like
cer
PRO
0
1.1k
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
The Language of Interfaces
destraynor
162
25k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Code Reviewing Like a Champion
maltzj
527
40k
BBQ
matthewcrist
89
9.9k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
A Tale of Four Properties
chriscoyier
162
23k
Thoughts on Productivity
jonyablonski
73
5k
Context Engineering - Making Every Token Count
addyosmani
9
490
Six Lessons from altMBA
skipperchong
29
4.1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
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