Universal programming recipes
Kateryna Trofimenko iOS developer
What do we do?
Application
What do we do?
ApplicationService
What do we do?
ApplicationServicePlatform
What do we do?
ApplicationServicePlatformUser experience
What are the properties of good code?
Readable and well documented
Working
Difference engine by Charles Babbage
Patterns
a general solution to a problem
Patterns
a general solution to a problem
a reusable architectural outline
Delegate
Customise behaviour without subclassing
DelegateCustomise behaviour without subclassing
UIApplication UIApplicationDelegate
Data Source
Customise data retrieval without subclassing
Data SourceCustomise data retrieval without subclassing
UITableView DataSource
Data SourceCustomise data retrieval without subclassing
UITableView DataSource
UICollectionView DataSource
Data SourceCustomise data retrieval without subclassing
UITableView DataSource
UICollectionView DataSource
UIPickerView DataSource
Data SourceCustomise data retrieval without subclassing
section count cells count
headers cells
UITableView DataSource
Target - Action
A consistent way to connect controls to custom logic
Target - ActionA consistent way to connect controls to custom logic
UIButton
@IBAction func buttonAction(sender: AnyObject)
button.addTarget(self, action: "buttonAction", forControlEvents: .TouchUpInside)
Target - ActionA consistent way to connect controls to custom logic
UISwitcher
switcher.addTarget(self, action: "switchAction", forControlEvents: .ValueChanged)
Target - ActionA consistent way to connect controls to custom logic
UIGestureRecognizer
gestureRecognizer.addTarget(self, action: "tapGestureAction")
Responder chainHandle events without knowledge of which object will be used
Responder chainHandle events without knowledge of which object will be used
useraction
Responder chainHandle events without knowledge of which object will be used
useraction UIView
Responder chainHandle events without knowledge of which object will be used
useraction UIView
UIView
Responder chainHandle events without knowledge of which object will be used
useraction UIView
UIView
UIView
UIView
Composite
Manipulate a group of objects as a single object
CompositeManipulate a group of objects as a single object
UIView
CompositeManipulate a group of objects as a single object
UIView
UIView
UIView
UIView
CompositeManipulate a group of objects as a single object
UIViewUIView
UIView
UIView
CompositeManipulate a group of objects as a single object
UIView
UIView
UIView
UIView
MVC
Model View
Controller
MVC
Model View
Controller
Updates
User actionsNotifications
More…
MVPMVVMVIPER
iOS Architecture Patterns
bit.ly/iOS_Patterns
Bohdan Orlov iOS developer
find the truth
ask why, not how
Clear responsibilities
Profile View Controller
Input validator
Profile View Controller
Input validator
Chat View Controller
Input validator
Profile View Controller
Input validator
Chat View Controller
Input validator Tests
Simplify with immutability
Simplify with immutability
Simplify with immutability
Simplify with immutability
Simplify with immutability
Simplify with immutability
Core iOS Application Architectural Patterns bit.ly/wwdc2014-224
Advanced iOS Application Architecture and Patterns bit.ly/wwdc2014-229
Designing Intuitive User Experiences bit.ly/wwdc2014-211
Protocol-Oriented Programming in Swift bit.ly/wwdc2015-408
• developer.apple.com • iosdevweekly.com • ios-goodies.com • natashatherobot.com • swiftnews.curated.co • mikeash.com/pyblog • www.objc.io • nshipster.com • www.jessesquires.com • yalantis.com/blog/category/programming/ • lists.swift.org/pipermail/swift-users/ • lists.swift.org/pipermail/swift-evolution/
Veronica Ray Cathy Birdy Erica Sadun
Ayaka Nonaka Mike Ash
Ash Furrow Andy Matuschak
Chris Eidhof
Marcin Krzyzanowski Ørta
Peter Steinberger Javier Soto Nate Cook
Felix Krause Ray Wenderlich
A. Nelson-Hornstein
2007 2008 2010 2014
2007 2008 2010 2014
Professions that don’t exist - yet!
techblog.badoo.com
BadooTech @BadooTech
[email protected]
kutusha @_fima346
Badoo