Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
720
Deep dive into Protocols
riteshhh
1
470
Thinking in Swift!
riteshhh
3
460
Other Decks in Programming
See All in Programming
The Rails Doctrine Decade
koic
2
590
Event is what happens
moro
2
780
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
410
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
260
contenteditable と日本語入力に向き合う
colorful12
0
200
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
390
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
270
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
2
560
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.9k
Featured
See All Featured
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
The Invisible Side of Design
smashingmag
301
52k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
550
How to Talk to Developers About Accessibility
jct
2
580
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Into the Great Unknown - MozCon
thekraken
41
2.8k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
580
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
990
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
480
The Art of Programming - Codeland 2020
erikaheidi
57
14k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
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