Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Grand Tour of iOS Architectures

The Grand Tour of iOS Architectures

Presented at iOSCon 2017 in London.

Video and more detail here: http://cutting.io/posts/the-grand-tour-of-ios-architectures/

Join Dan on this grand tour and discover the plethora of iOS software architectures popping up, from VIPER, VIP and Clean to Flux, Redux and Reactive. Along the way Dan will highlight the common themes and look at some real case studies, to get to the essence of what architecture is and why you should think about it for your app.

Dan Cutting

March 30, 2017
Tweet

More Decks by Dan Cutting

Other Decks in Programming

Transcript

  1. @dcutting ✓ Read/update views ✓ Convert taps into actions ✓

    Decide when to route ✓ Present/dismiss screens ✓ Inject dependencies ✓ Feature logic ✓ Talk to external systems ✓ Parse data ✓ Read/update models ✓ Domain logic ✓ Format data for the view ✓ Respond to other VCs
  2. @dcutting ✓ Read/update views ✓ Convert taps into actions ✓

    Decide when to route ✓ Present/dismiss screens ✓ Inject dependencies ✓ Feature logic ✓ Talk to external systems ✓ Parse data ✓ Read/update models ✓ Domain logic ✓ Format data for the view ✓ Respond to other VCs
  3. @dcutting override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if

    segue.identifier == "createLocation" { guard let creatorViewController = segue.destination as? CreatorViewController else { return } creatorViewController.delegate = self } }
  4. @dcutting ✓ Read/update views ✓ Convert taps into actions ✓

    Decide when to route ✓ Present/dismiss screens ✓ Inject dependencies ✓ Respond to other VCs ✓ Format data for the view ✓ Feature logic ✓ Domain logic ✓ Read/update models ✓ Talk to external systems ✓ Parse data
  5. @dcutting View Controllers ✓ Read/update views ✓ Convert taps into

    actions Presenters ✓ Decide when to route ✓ Respond to other modules ✓ Format data for the view Entities ✓ Domain logic Interactors ✓ Feature logic ✓ Read/update models Routers ✓ Present/dismiss screens ✓ Inject dependencies Gateways ✓ Talk to external systems ✓ Parse data
  6. @dcutting View Controllers ✓ Read/update views ✓ Convert taps into

    actions Presenters ✓ Decide when to route ✓ Respond to other modules ✓ Format data for the view Entities ✓ Domain logic Interactors ✓ Feature logic ✓ Read/update models Routers ✓ Present/dismiss screens ✓ Inject dependencies Gateways ✓ Talk to external systems ✓ Parse data
  7. @dcutting Lines of code 0 225 450 675 900 Number

    of types 0 3 6 9 12 15 18 MVC VIP
  8. @dcutting Back home to Blighty • Talk to your colleagues

    • Piecemeal refactoring OK! • Stop extracting when you’re happy with test coverage