Android @ Scale

7ace70cd355db1983dea895fbe01a4ef?s=47 rallat
April 13, 2018

Android @ Scale

5 minute talk at Shibuya APK

7ace70cd355db1983dea895fbe01a4ef?s=128

rallat

April 13, 2018
Tweet

Transcript

  1. Android @ Scale

  2. Israel Ferrer Camacho @rallat

  3. MV

  4. MV WW

  5. WW = “whatever works”

  6. Define Principles

  7. Apply Principles

  8. with Consistency Apply Principles

  9. Principles must evolve

  10. Principles?

  11. Dependency Injection

  12. Dependency Injection

  13. Dependency Injection Allows to declare dependencies of an object upfront.

  14. Dependency Injection Allows to declare dependencies of an object upfront.

    This helps to easily mock dependencies and unit test the object
  15. Single Responsibility

  16. None
  17. View layer

  18. UI Manipulation

  19. UI Manipulation

  20. Logic layer UI Manipulation

  21. Screen Behavior UI Manipulation

  22. Screen Behavior UI Manipulation

  23. Screen Behavior UI Manipulation Data layer

  24. Screen Behavior UI Manipulation Repository Interface Network DB Memory cache

  25. Complex screens

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

    responsibility.
  27. 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)
  28. Shared logic

  29. Shared logic If the view is shared you can create

    a 3 layered complete feature component.
  30. 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…
  31. Data layer View layer Logic layer

  32. Use cases Screen behavior View layer Data layer

  33. Screen behavior View layer Data layer

  34. Screen behavior View layer Data layer Sort Items

  35. Screen behavior View layer Data layer Sort Items Buy Item

  36. Screen behavior View layer Data layer Sort Items Buy Item

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

    Like Item Comment Item
  38. Goal

  39. Goal Each layer has a reason to exist.

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

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

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

    codebase Testable logic layer Reusable of logic layer
  43. Do Not Over-Engineer

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

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

    goal is to ship and maintain speed of development
  46. Questions? @rallat