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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Swift India
April 29, 2017
Programming
74
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
170
Furlenco's AR Journey
swiftindia
0
160
Image processing using Core Image and Metal
swiftindia
0
260
Combine - Diving into Apple’s Reactive Programming
swiftindia
1
290
Social in Hotstar
swiftindia
0
270
Improving App Launch Time
swiftindia
1
150
Backend Driven UIs
swiftindia
0
150
Other Decks in Programming
See All in Programming
Claspは野良GASの夢をみるか
takter00
0
180
3Dシーンの圧縮
fadis
1
730
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
750
AI駆動開発で崩れていくコードベースを立て直す
kyoko_nr_nr
1
450
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
110
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
130
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.4k
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.6k
Modding RubyKaigi for Myself
yui_knk
0
920
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
160
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
120
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
540
Featured
See All Featured
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
220
Faster Mobile Websites
deanohume
310
31k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Amusing Abliteration
ianozsvald
1
200
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
Are puppies a ranking factor?
jonoalderson
1
3.5k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
390
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
360
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
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