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

App Architectures: Remixed (early EE edition)

App Architectures: Remixed (early EE edition)

Many apps support multiple “themes”, but some need the ability to be remixed with specialised flows and feature sets, while reusing as much as possible.

When layouts, flows and business logic live in View Controllers, it’s difficult to do this well. But a combination of Coordinators and Clean architecture make remixed apps not just possible, but straightforward and easy to test too.

Dan Cutting guides us through the techniques they're applying at Schibsted to achieve highly flexible, well tested mobile software using the 'Remix' approach.

Dan Cutting

November 29, 2017
Tweet

More Decks by Dan Cutting

Other Decks in Programming

Transcript

  1. Who? • Biggest Internet company
 you’ve never heard of •

    Media & marketplaces • 260 million users • I’m an iOS developer and technical lead for one of our teams
  2. –Uncle Bob “The goal of software architecture is to minimize

    the human resources required to build and maintain the required system” Clean Architecture
  3. MVC

  4. • Buyer Team wants to make browsing ads fun •

    Seller Team wants to make managing ads easy A tale of 2 teams
  5. • Buyer Team wants to make browsing ads fun •

    Seller Team wants to make managing ads easy • Mostly separate goals A tale of 2 teams
  6. • Buyer Team wants to make browsing ads fun •

    Seller Team wants to make managing ads easy • Mostly separate goals • Mostly separate parts of the code A tale of 2 teams
  7. • Buyer Team wants to make browsing ads fun •

    Seller Team wants to make managing ads easy • Mostly separate goals • Mostly separate parts of the code • …mostly A tale of 2 teams
  8. Ad Detail VC Ad Edit VC Ad List VC Browse

    Flow Flow coordinators Edit Gateway
  9. Buyer Ad Detail VC Ad Edit VC Ad List VC

    Browse Flow Seller Ad Detail VC Common
 Ad Detail
  10. Ad List VC Browse Flow Intrepid Shop Team Shop Flow

    App Ad List
 Decorator Shop Badge
 Decorator
  11. Marketplace B App List Browse
 Flow Card Browse Flow Ad

    Detail VC Ad List VC Ad Cards VC Custom UX Marketplace A App
  12. App List Browse
 Flow Card Browse Flow Ad Detail VC

    Ad List VC Ad Cards VC A/B Browse
 Flow A/B testing
  13. What have we learnt? • Too much negotiation? Break it

    down! • Too much overhead? Build it up!
  14. What have we learnt? • Too much negotiation? Break it

    down! • Too much overhead? Build it up! • Reuse gives you wings
  15. What have we learnt? • Too much negotiation? Break it

    down! • Too much overhead? Build it up! • Reuse gives you wings • But it implies dependencies
  16. What have we learnt? • Too much negotiation? Break it

    down! • Too much overhead? Build it up! • Reuse gives you wings • But it implies dependencies • Optimise out-of-band
  17. UI layout UI flow Spies Network gateway Stubs Important code

    More important code Acceptance tests & fixtures
  18. Fixture Browse Flow Gateway Stub List Spy Detail Spy UINavigation

    Controller UI flow Spies Stubs Important code
  19. UINavigation Controller Fixture Browse Flow Gateway Stub List Spy Detail

    Spy Navigator Fake UI flow Spies Stubs Important code
  20. Coda • Should every app be written like this? •

    Probably not: architecture should support your goals • But maybe every app should follow similar principles