Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
how to be a POP-Star (Swift Chennai Meetup) ~ Ritesh Gupta
Slide 2
Slide 2 text
/@_riteshhh /riteshhgupta /issues/295 /swift-snippets
Slide 3
Slide 3 text
No content
Slide 4
Slide 4 text
No content
Slide 5
Slide 5 text
`Protocol-Oriented Programming in Swift` https://developer.apple.com/videos/play/wwdc2015/408/ WWDC - 2015
Slide 6
Slide 6 text
`Protocol and Value Oriented Programming in UIKit Apps` https://developer.apple.com/videos/play/wwdc2016/419/ WWDC - 2016
Slide 7
Slide 7 text
Swift is just not a syntax migration from Objective-C…
Slide 8
Slide 8 text
Swift is not objective-c styled language…
Slide 9
Slide 9 text
C ~> C++ Objective-C ~> Swift { imperative } { object oriented } { object oriented } { protocol oriented }
Slide 10
Slide 10 text
Entity (class, struct - UI or Model) vs Behaviour (protocol)
Slide 11
Slide 11 text
Entity is collection of behaviours…
Slide 12
Slide 12 text
UIButton UIBarButtonItem
Slide 13
Slide 13 text
UIBarButtonItem UIBarItem NSObject UIButton UIControl UIView
Slide 14
Slide 14 text
UIBarButtonItem UIBarItem NSObject UIButton UIControl UIView
Slide 15
Slide 15 text
No content
Slide 16
Slide 16 text
No content
Slide 17
Slide 17 text
UIKit + Protocols
Slide 18
Slide 18 text
UIView Framable
Slide 19
Slide 19 text
UIImageView ImageRenderable, Framable
Slide 20
Slide 20 text
UIButton Tappable, ImageRenderable, Framable
Slide 21
Slide 21 text
compose everything with Protocols..
Slide 22
Slide 22 text
UITableViewCell UICollectionViewCell Reusable, Framable
Slide 23
Slide 23 text
UIScrollView Scrollable, Framable
Slide 24
Slide 24 text
UITableView UICollectionView Listable, Scrollable, Framable
Slide 25
Slide 25 text
thinking in protocol..
Slide 26
Slide 26 text
protocol ->
Slide 27
Slide 27 text
protocol -> protocol extension ->
Slide 28
Slide 28 text
protocol -> protocol extension -> protocol constrained extension ->
Slide 29
Slide 29 text
playground demos..
Slide 30
Slide 30 text
protocol is not a silver bullet.. http://chris.eidhof.nl/post/protocol-oriented-programming/
Slide 31
Slide 31 text
..computed variables, extensions, values types, immutability, functional programming, generics, enums, associative types/ values..
Slide 32
Slide 32 text
No content