Slide 1

Slide 1 text

@Guardiola31337 @kinisoftware ARCHITECTURE & TESTING Android developer’s mantra MADRID - NOV 27-28 - 2015

Slide 2

Slide 2 text

What is CLEAN ARCHITECTURE? MAINTAINABLE

Slide 3

Slide 3 text

What is CLEAN ARCHITECTURE? MAINTAINABLE TESTABLE

Slide 4

Slide 4 text

What is CLEAN ARCHITECTURE? TESTABLE MAINTAINABLE LOW TECHNICAL DEBT

Slide 5

Slide 5 text

What is CLEAN ARCHITECTURE?

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

The BASICS S O L I D

Slide 8

Slide 8 text

The BASICS Single Responsibility O L I D

Slide 9

Slide 9 text

The BASICS Single Responsibility L I D Open/Close

Slide 10

Slide 10 text

The BASICS Single Responsibility I D Open/Close Liskov Substitution

Slide 11

Slide 11 text

The BASICS Single Responsibility D Open/Close Liskov Substitution Interface Segregation

Slide 12

Slide 12 text

The BASICS Single Responsibility Open/Close Liskov Substitution Interface Segregation Dependency Inversion

Slide 13

Slide 13 text

Architecture

Slide 14

Slide 14 text

DIFFERENT names, SAME philosophy Achieve a high-level SEPARATION of CONCERNS by LAYERING

Slide 15

Slide 15 text

BENEFITS INDEPENDENT of FRAMEWORKS

Slide 16

Slide 16 text

TESTABLE INDEPENDENT of FRAMEWORKS BENEFITS

Slide 17

Slide 17 text

TESTABLE EASY to UNDERSTAND INDEPENDENT of FRAMEWORKS BENEFITS

Slide 18

Slide 18 text

Hexagonal

Slide 19

Slide 19 text

What is HEXAGONAL Architecture? "Allow an application to equally be driven by users, programs, automated test or batch scripts, and to be developed and tested in isolation from its eventual run-time devices and databases". - Alistair Cockburn

Slide 20

Slide 20 text

PORTS What is HEXAGONAL Architecture?

Slide 21

Slide 21 text

PORTS ADAPTERS What is HEXAGONAL Architecture?

Slide 22

Slide 22 text

Business Logic Events adapter In-memory events adapter Database adapter In-memory database adapter EVENTS PORT DATABASE PORT What is HEXAGONAL Architecture?

Slide 23

Slide 23 text

The DEPENDENCY rule Dependencies

Slide 24

Slide 24 text

ADVANTAGES Ports and Adapters are INTERCHANGEABLE

Slide 25

Slide 25 text

ADVANTAGES DEFER DECISIONS until the very END Ports and Adapters are INTERCHANGEABLE

Slide 26

Slide 26 text

ADVANTAGES DEFER DECISIONS until the very END IMPLEMENT features FASTER Ports and Adapters are INTERCHANGEABLE

Slide 27

Slide 27 text

TESTING

Slide 28

Slide 28 text

Types of Tests UNIT

Slide 29

Slide 29 text

Types of Tests UNIT INTEGRATION

Slide 30

Slide 30 text

Types of Tests UNIT INTEGRATION E2E

Slide 31

Slide 31 text

ACKNOWLEDGEMENTS … @artolamola @ggalmazor @47deg

Slide 32

Slide 32 text

REFERENCES Hexagonal Architecture - Fideloper (http://fideloper.com/hexagonal-architecture) Hexagonal architecture - Alistair Cockburn (http://alistair.cockburn.us/Hexagonal+architecture) The Clean Architecture - Uncle Bob (https://blog.8thlight.com/uncle-bob/2012/08/13/the-clean- architecture.html) What is Hexagonal Architecture? - Philip Brown (http://culttt.com/2014/12/31/hexagonal- architecture/) Ports-And-Adapters / Hexagonal Architecture (http://www.dossier-andreas.net/ software_architecture/ports_and_adapters.html)

Slide 33

Slide 33 text

Let’s code!

Slide 34

Slide 34 text

https://github.com/Guardiola31337/ codemotion-workshop Github REPO

Slide 35

Slide 35 text

Thank you! @Guardiola31337 @kinisoftware