Slide 1

Slide 1 text

ed App Architectures @dcutting cutting.io Dan Cutting Schibsted

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

¯\_(ツ)_/¯

Slide 6

Slide 6 text

Marketplaces

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

2015 2016 mid-2017 late-2017 Developers 0 3 6 9 12 Timeline

Slide 9

Slide 9 text

–Uncle Bob “The goal of software architecture is to minimize the human resources required to build and maintain the required system” Clean Architecture

Slide 10

Slide 10 text

MVC

Slide 11

Slide 11 text

MVC MVVM VIPER

Slide 12

Slide 12 text

MVC MVVM VIPER

Slide 13

Slide 13 text

Our app

Slide 14

Slide 14 text

Our app context • many markets • remixable features • remote teams • frequent releases

Slide 15

Slide 15 text

Our app context • many markets • remixable features • remote teams • frequent releases ?

Slide 16

Slide 16 text

break it down build it up

Slide 17

Slide 17 text

Ad List VC Ad Detail VC Happy Buyer Team make browsing ads fun

Slide 18

Slide 18 text

Ad Detail VC Ad Edit VC Ad List VC Glorious Seller Team Edit Gateway make selling stuff easy

Slide 19

Slide 19 text

Ad Detail VC Ad Edit VC Ad List VC Browse Flow Flow coordinators Edit Gateway

Slide 20

Slide 20 text

Belarus App Browse Flow Ad Detail VC Ad List VC Custom views

Slide 21

Slide 21 text

Browse Flow Ad Detail VC Ad Cards VC Custom views Mexico App

Slide 22

Slide 22 text

“software components should be as small as possible but no smaller - Einstein?

Slide 23

Slide 23 text

test (1, 2)

Slide 24

Slide 24 text

End-to-end (E2E)

Slide 25

Slide 25 text

Experience the app
 just like a real user ✔ End-to-end (E2E)

Slide 26

Slide 26 text

1. Slow, vague

Slide 27

Slide 27 text

1. Slow, vague ✗

Slide 28

Slide 28 text

1. Slow, vague ? ✗

Slide 29

Slide 29 text

1. Slow, vague ? ? ✗

Slide 30

Slide 30 text

1. Slow, vague ? ? ? ? ? ? ? ? ? ? ? ✗

Slide 31

Slide 31 text

2. Insufficient

Slide 32

Slide 32 text

2. Insufficient ✗

Slide 33

Slide 33 text

E2E, huh! good god What is it good for?

Slide 34

Slide 34 text

E2E, huh! good god What is it good for? • Quality Assurance (QA)?

Slide 35

Slide 35 text

E2E, huh! good god What is it good for? • Quality Assurance (QA)? • Not good for baking in quality

Slide 36

Slide 36 text

E2E, huh! good god What is it good for? • Quality Assurance (QA)? • Not good for baking in quality • Not good for assuring the product

Slide 37

Slide 37 text

E2E, huh! good god What is it good for? • Quality Assurance (QA)? • Not good for baking in quality • Not good for assuring the product • OK for smoke tests

Slide 38

Slide 38 text

E2E

Slide 39

Slide 39 text

E2E Unit Tests

Slide 40

Slide 40 text

Acceptance E2E Unit Tests

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

100% of app User Web

Slide 44

Slide 44 text

UIKit views/controllers Network gateway User Web 99% of app

Slide 45

Slide 45 text

UIKit views/controllers Spies Network gateway Stubs 99% of app

Slide 46

Slide 46 text

UIKit views/controllers Spies Network gateway Stubs 99% of app Acceptance tests & fixtures

Slide 47

Slide 47 text

View Controller Humble views

Slide 48

Slide 48 text

View View Controller View Data Humble views

Slide 49

Slide 49 text

View View Controller View Data Humble views

Slide 50

Slide 50 text

View View Controller View Data Humble views

Slide 51

Slide 51 text

View View Controller View Data View Spy Humble views

Slide 52

Slide 52 text

View View Controller View Data View Spy Humble views (+ gateways)

Slide 53

Slide 53 text

App Delegate Browse Flow Gateway List VC Detail VC Business logic Spies Stubs 99% of app

Slide 54

Slide 54 text

Browse Flow Gateway Stub List Spy Detail Spy Business logic Spies Stubs 99% of app App Delegate

Slide 55

Slide 55 text

Fixture Browse Flow Gateway Stub List Spy Detail Spy Business logic Spies Stubs 99% of app

Slide 56

Slide 56 text

Fixture Browse Flow Gateway Stub List Spy Detail Spy UINavController UI flow Spies Stubs Business logic Business logic

Slide 57

Slide 57 text

UINavController Fixture Browse Flow Gateway Stub List Spy Detail Spy Navigator Fake UI flow Spies Stubs Business logic Business logic

Slide 58

Slide 58 text

UINavController Fixture Browse Flow Gateway Stub List Spy Detail Spy Navigator Fake No more UIKit! UI flow Spies Stubs Business logic Business logic

Slide 59

Slide 59 text

Loading Sirius
 Canopus
 Arcturus Could not
 load star < Sirius < Brightest star
 in the sky

Slide 60

Slide 60 text

Loading Sirius
 Canopus
 Arcturus Could not
 load star < Sirius < Brightest star
 in the sky Demo

Slide 61

Slide 61 text

break it down build it up

Slide 62

Slide 62 text

ed App Architectures github.com/dcutting/Remix @dcutting cutting.io Dan Cutting Schibsted /paulstringer/OCSlimProject