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
66
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
160
Efficient JSON to Object Parsing
swiftindia
0
140
Sign In with Apple
swiftindia
0
140
Furlenco's AR Journey
swiftindia
0
120
Image processing using Core Image and Metal
swiftindia
0
210
Combine - Diving into Apple’s Reactive Programming
swiftindia
1
250
Social in Hotstar
swiftindia
0
250
Improving App Launch Time
swiftindia
1
110
Backend Driven UIs
swiftindia
0
130
Other Decks in Programming
See All in Programming
フロントエンド開発のためのブラウザ組み込みAI入門
masashi
7
3.7k
ノーコードからの脱出 -地獄のデスロード- / Escape from Base44
keisuke69
0
330
iOSでSVG画像を扱う
kishikawakatsumi
0
180
GitHub Copilotを使いこなせ!/mastering_github_copilot!
kotakageyama
2
710
CSC305 Lecture 12
javiergs
PRO
0
250
テーブル定義書の構造化抽出して、生成AIでDWH分析を試してみた / devio2025tokyo
kasacchiful
0
360
O Que É e Como Funciona o PHP-FPM?
marcelgsantos
0
250
AsyncSequenceとAsyncStreamのプロポーザルを全部読む!!
s_shimotori
1
220
Module Proxyのマニアックな話 / Niche Topics in Module Proxy
kuro_kurorrr
0
1.1k
Kotlin 2.2が切り拓く: コンテキストパラメータで書く関数型DSLと新しい依存管理のかたち
knih
0
240
CSC305 Lecture 13
javiergs
PRO
0
340
AkarengaLT vol.38
hashimoto_kei
1
130
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.7k
Building an army of robots
kneath
306
46k
4 Signs Your Business is Dying
shpigford
186
22k
The Cost Of JavaScript in 2023
addyosmani
55
9.1k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Agile that works and the tools we love
rasmusluckow
331
21k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
Code Review Best Practice
trishagee
72
19k
How to train your dragon (web standard)
notwaldorf
97
6.3k
Balancing Empowerment & Direction
lara
5
710
GraphQLとの向き合い方2022年版
quramy
49
14k
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