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

Architecture & Testing - Android developer's mantra (Codemotion Spain 2015)

Architecture & Testing - Android developer's mantra (Codemotion Spain 2015)

Slides used to facilitate the workshop.

An example of how to create an Android app from scratch taking care of Architecture and Testing.

All the instructions in order to follow the workshop and the source code can be found here:
https://github.com/Guardiola31337/codemotion-workshop

Pablo Guardiola

December 01, 2015
Tweet

More Decks by Pablo Guardiola

Other Decks in Programming

Transcript

  1. @Guardiola31337 @kinisoftware ARCHITECTURE & TESTING Android developer’s mantra MADRID -

    NOV 27-28 - 2015
  2. What is CLEAN ARCHITECTURE? MAINTAINABLE

  3. What is CLEAN ARCHITECTURE? MAINTAINABLE TESTABLE

  4. What is CLEAN ARCHITECTURE? TESTABLE MAINTAINABLE LOW TECHNICAL DEBT

  5. What is CLEAN ARCHITECTURE?

  6. None
  7. The BASICS S O L I D

  8. The BASICS Single Responsibility O L I D

  9. The BASICS Single Responsibility L I D Open/Close

  10. The BASICS Single Responsibility I D Open/Close Liskov Substitution

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

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

    Inversion
  13. Architecture

  14. DIFFERENT names, SAME philosophy Achieve a high-level SEPARATION of CONCERNS

    by LAYERING
  15. BENEFITS INDEPENDENT of FRAMEWORKS

  16. TESTABLE INDEPENDENT of FRAMEWORKS BENEFITS

  17. TESTABLE EASY to UNDERSTAND INDEPENDENT of FRAMEWORKS BENEFITS

  18. Hexagonal

  19. 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
  20. PORTS What is HEXAGONAL Architecture?

  21. PORTS ADAPTERS What is HEXAGONAL Architecture?

  22. Business Logic Events adapter In-memory events adapter Database adapter In-memory

    database adapter EVENTS PORT DATABASE PORT What is HEXAGONAL Architecture?
  23. The DEPENDENCY rule Dependencies

  24. ADVANTAGES Ports and Adapters are INTERCHANGEABLE

  25. ADVANTAGES DEFER DECISIONS until the very END Ports and Adapters

    are INTERCHANGEABLE
  26. ADVANTAGES DEFER DECISIONS until the very END IMPLEMENT features FASTER

    Ports and Adapters are INTERCHANGEABLE
  27. TESTING

  28. Types of Tests UNIT

  29. Types of Tests UNIT INTEGRATION

  30. Types of Tests UNIT INTEGRATION E2E

  31. ACKNOWLEDGEMENTS … @artolamola @ggalmazor @47deg

  32. 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)
  33. Let’s code!

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

  35. Thank you! @Guardiola31337 @kinisoftware