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
64
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
110
Sign In with Apple
swiftindia
0
110
Furlenco's AR Journey
swiftindia
0
100
Image processing using Core Image and Metal
swiftindia
0
180
Combine - Diving into Apple’s Reactive Programming
swiftindia
1
210
Social in Hotstar
swiftindia
0
200
Improving App Launch Time
swiftindia
1
81
Backend Driven UIs
swiftindia
0
100
Other Decks in Programming
See All in Programming
Writing documentation can be fun with plugin system
okuramasafumi
0
120
Kanzawa.rbのLT大会を支える技術の裏側を変更する Ruby on Rails + Litestream 編
muryoimpl
0
220
[JAWS-UG横浜 #80] うわっ…今年のServerless アップデート、少なすぎ…?
maroon1st
1
170
チームリードになって変わったこと
isaka1022
0
190
SwiftUIで単方向アーキテクチャを導入して得られた成果
takuyaosawa
0
260
iOSエンジニアから始める visionOS アプリ開発
nao_randd
3
120
Spring gRPC について / About Spring gRPC
mackey0225
0
220
テストをしないQAエンジニアは何をしているか?
nealle
0
130
CI改善もDatadogとともに
taumu
0
110
Amazon Q Developer Proで効率化するAPI開発入門
seike460
PRO
0
110
XStateを用いた堅牢なReact Components設計~複雑なClient Stateをシンプルに~ @React Tokyo ミートアップ #2
kfurusho
1
770
Honoのおもしろいミドルウェアをみてみよう
yusukebe
1
200
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Producing Creativity
orderedlist
PRO
343
39k
How GitHub (no longer) Works
holman
313
140k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Music & Morning Musume
bryan
46
6.3k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Building Your Own Lightsaber
phodgson
104
6.2k
Navigating Team Friction
lara
183
15k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
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