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 by Ritesh at SwiftChennai-4
Search
Swift India
April 29, 2017
Programming
0
62
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
130
Efficient JSON to Object Parsing
swiftindia
0
96
Sign In with Apple
swiftindia
0
110
Furlenco's AR Journey
swiftindia
0
96
Image processing using Core Image and Metal
swiftindia
0
170
Combine - Diving into Apple’s Reactive Programming
swiftindia
1
190
Social in Hotstar
swiftindia
0
190
Improving App Launch Time
swiftindia
1
75
Backend Driven UIs
swiftindia
0
100
Other Decks in Programming
See All in Programming
subpath importsで始めるモック生活
10tera
0
310
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
110
Ethereum_.pdf
nekomatu
0
460
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
430
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
230
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
Remix on Hono on Cloudflare Workers
yusukebe
1
290
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
600
Better Code Design in PHP
afilina
PRO
0
130
Featured
See All Featured
It's Worth the Effort
3n
183
27k
Happy Clients
brianwarren
98
6.7k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Scaling GitHub
holman
458
140k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Writing Fast Ruby
sferik
627
61k
The Cult of Friendly URLs
andyhume
78
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