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

Remix workshop

Remix workshop

Dan introduces the Remix architecture, aimed at maximising reuse of components for apps that spin variations on a theme.

Many apps support multiple skins, but some need the ability to be remixed with entirely customised flows or combinations of features for different customers. It's difficult to do this well with a typical View Controller-centric architecture, but a combination of Coordinators and Clean architecture make this not just possible but pleasant and easy to test too.

Dan Cutting

August 08, 2017
Tweet

More Decks by Dan Cutting

Other Decks in Programming

Transcript

  1. COORDINATORS ▸ Flow logic in one place (high cohesion) ▸

    Flows have names ▸ (More) reusable views Coordinators GameCoordinator PickGameView PickNumberView PlayGameView
  2. CLEAN Clean GameCoordinator GameInteractor PickGameView PickNumberView PlayGameFormatter PlayGameView ▸ Reusable

    business logic ▸ Reusable presentation logic ▸ Coordinators just
 keep flow logic ▸ New flow ➜
 new coordinator
  3. AUTOMATED TESTS ▸ Decouple UIKit ▸ Test everything except thin

    UIKit layer ▸ Blazing fast ▸ Unit, flow & acceptance tests
 without a simulator!
  4. REMIX OUR EXPERIENCES ▸ Separate flow, business, presentation logic
 ➜

    loose coupling, high cohesion
 ➜ readable, maintainable, composable ▸ Easy, fast tests ▸ But: dependency injection! ▸ And: the more you share, the more you (have to) care