snips mvc revisited by michael fester

19
Michael Fester @michaelfester :snips MVC revisited

Upload: cocoaheads-france

Post on 15-Jul-2015

4.542 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Snips MVC revisited by Michael Fester

Michael Fester @michaelfester

:snips

MVC revisited

Page 2: Snips MVC revisited by Michael Fester
Page 3: Snips MVC revisited by Michael Fester

BAR

BANK WAITING TIME: 15 MIN

FOOD COURT RATING: 4/5

WAITING TIME: 2 MIN

METRO STATION LINE: 1, TRAFFIC: FLUID

NEXT PEAK: 17:45

TUESDAY, 14:25 CLOUDY, RAIN: 15%TEMPERATURE: 18°C

NATIONAL HOLIDAYCAR TRAFFIC FLUID, NO DANGER

CONSTRUCTION SITE NOISY, FREQUENT TRUCK STOPS

POLICE STATIONBUS STOP

LINES: 45, 72, 96, 108NEXT ARRIVAL: 4 MIN

Page 4: Snips MVC revisited by Michael Fester
Page 5: Snips MVC revisited by Michael Fester
Page 6: Snips MVC revisited by Michael Fester

Going to work Before a meeting At lunch At a club

Page 7: Snips MVC revisited by Michael Fester

Model-View-Controller (MVC)

Page 8: Snips MVC revisited by Michael Fester

Model-View-ViewModel (MVVM)

Page 9: Snips MVC revisited by Michael Fester

Tasks of the ViewModel

» Network logic » Updating models » Maintaining UI state » Formatting (numbers, strings, dates) » Responding to user input

Page 10: Snips MVC revisited by Michael Fester

View models are testable View models are serialisable View models are portable

Page 11: Snips MVC revisited by Michael Fester

HomeViewModel

Page 12: Snips MVC revisited by Michael Fester

HomeViewController

Page 13: Snips MVC revisited by Michael Fester

Loading state

Page 14: Snips MVC revisited by Michael Fester

Form validation

Page 15: Snips MVC revisited by Michael Fester

Unit testing signals

Page 16: Snips MVC revisited by Michael Fester

ViewController revisited

» Layout » Animation » Transition » Rotation

Page 17: Snips MVC revisited by Michael Fester

ViewModel

» Network logic » Updating models » Maintaining UI state » Formatting (numbers, strings, dates) » Responding to user input

Page 18: Snips MVC revisited by Michael Fester

Data binding in ReactiveCocoa

» Consistency » Explicit » Functional » Stateless

Page 19: Snips MVC revisited by Michael Fester

Come build delightful apps with us

www.snips.net

@snips