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 by Ritesh at SwiftChennai-4
Search
Swift India
April 29, 2017
Programming
75
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
How to be a POP-Star by Ritesh at SwiftChennai-4
Protocol Oriented Programming
Swift India
April 29, 2017
More Decks by Swift India
See All by Swift India
Network Layer Abstraction
swiftindia
0
190
Efficient JSON to Object Parsing
swiftindia
0
180
Sign In with Apple
swiftindia
0
190
Furlenco's AR Journey
swiftindia
0
160
Image processing using Core Image and Metal
swiftindia
0
270
Combine - Diving into Apple’s Reactive Programming
swiftindia
1
310
Social in Hotstar
swiftindia
0
280
Improving App Launch Time
swiftindia
1
160
Backend Driven UIs
swiftindia
0
160
Other Decks in Programming
See All in Programming
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
290
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
180
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
570
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
300
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
200
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
430
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
4.8k
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.3k
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.1k
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
170
FreeBSDでZabbixを動かす
kenkino
0
350
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
9.3k
Featured
See All Featured
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
550
Statistics for Hackers
jakevdp
799
230k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Ethics towards AI in product and experience design
skipperchong
2
410
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
Google's AI Overviews - The New Search
badams
0
1.6k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.9k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
What does AI have to do with Human Rights?
axbom
PRO
1
2.4k
Optimizing for Happiness
mojombo
378
71k
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