Slide 1

Slide 1 text

Android @ Scale

Slide 2

Slide 2 text

Israel Ferrer Camacho @rallat

Slide 3

Slide 3 text

MV

Slide 4

Slide 4 text

MV WW

Slide 5

Slide 5 text

WW = “whatever works”

Slide 6

Slide 6 text

Define Principles

Slide 7

Slide 7 text

Apply Principles

Slide 8

Slide 8 text

with Consistency Apply Principles

Slide 9

Slide 9 text

Principles must evolve

Slide 10

Slide 10 text

Principles?

Slide 11

Slide 11 text

Dependency Injection

Slide 12

Slide 12 text

Dependency Injection

Slide 13

Slide 13 text

Dependency Injection Allows to declare dependencies of an object upfront.

Slide 14

Slide 14 text

Dependency Injection Allows to declare dependencies of an object upfront. This helps to easily mock dependencies and unit test the object

Slide 15

Slide 15 text

Single Responsibility

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

View layer

Slide 18

Slide 18 text

UI Manipulation

Slide 19

Slide 19 text

UI Manipulation

Slide 20

Slide 20 text

Logic layer UI Manipulation

Slide 21

Slide 21 text

Screen Behavior UI Manipulation

Slide 22

Slide 22 text

Screen Behavior UI Manipulation

Slide 23

Slide 23 text

Screen Behavior UI Manipulation Data layer

Slide 24

Slide 24 text

Screen Behavior UI Manipulation Repository Interface Network DB Memory cache

Slide 25

Slide 25 text

Complex screens

Slide 26

Slide 26 text

Complex screens Multiple logic layer components each with a single responsibility.

Slide 27

Slide 27 text

Complex screens Multiple logic layer components each with a single responsibility. Logic layer components can subscribe to events tied to their logic (E.g. Rx, EventBus)

Slide 28

Slide 28 text

Shared logic

Slide 29

Slide 29 text

Shared logic If the view is shared you can create a 3 layered complete feature component.

Slide 30

Slide 30 text

Shared logic If the view is shared you can create a 3 layered complete feature component. If the view is not share then add another layer…

Slide 31

Slide 31 text

Data layer View layer Logic layer

Slide 32

Slide 32 text

Use cases Screen behavior View layer Data layer

Slide 33

Slide 33 text

Screen behavior View layer Data layer

Slide 34

Slide 34 text

Screen behavior View layer Data layer Sort Items

Slide 35

Slide 35 text

Screen behavior View layer Data layer Sort Items Buy Item

Slide 36

Slide 36 text

Screen behavior View layer Data layer Sort Items Buy Item Like Item

Slide 37

Slide 37 text

Screen behavior View layer Data layer Sort Items Buy Item Like Item Comment Item

Slide 38

Slide 38 text

Goal

Slide 39

Slide 39 text

Goal Each layer has a reason to exist.

Slide 40

Slide 40 text

Goal Each layer has a reason to exist. Consistency in codebase

Slide 41

Slide 41 text

Goal Each layer has a reason to exist. Consistency in codebase Testable logic layer

Slide 42

Slide 42 text

Goal Each layer has a reason to exist. Consistency in codebase Testable logic layer Reusable of logic layer

Slide 43

Slide 43 text

Do Not Over-Engineer

Slide 44

Slide 44 text

Do Not Over-Engineer Libraries, patterns are tools not goals

Slide 45

Slide 45 text

Do Not Over-Engineer Libraries, patterns are tools not goals The goal is to ship and maintain speed of development

Slide 46

Slide 46 text

Questions? @rallat