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

"How to design your app and not be damned by maintenance team" from Anton Minashkin

"How to design your app and not be damned by maintenance team" from Anton Minashkin

Anton's topic will answer the questions how to tame your architecture, control complexity, continuously reduce technical debt and not go crazy. You will found out following tips, tricks and complaints.

uaMobiTech

July 28, 2016
Tweet

More Decks by uaMobiTech

Other Decks in Programming

Transcript

  1. How to design your app ...and not be damned by

    maintenance team by Anton Minashkin
  2. MV* Problems • Too high level • Not designed for

    Android • Solve only UI isolation problem
  3. Requirements: Maintainable • Documented • Simple on each level •

    Loosely coupled • Without technical dept • ...or at least technical dept should be clear enough
  4. Requirements: Testable • Easy to prove that universe works •

    Fearless refactoring • Every component could be mocked
  5. Requirements: Flexible • Possibility to add/remove feature without side effects

    on other features • If something looks like small change - it should be small change • Implementations could be changed without side effect • UI changes affects only UI (!!!)
  6. Requirements: Independent of 3d party libs • Tools should be

    used as tools • Possibility to change any lib/framework without pain and in reasonable time • Any 3rd party solution should be easy to mock
  7. Divide et impera • Keep the business rules not knowing

    anything at all about the outside world, • Single responsibility • Isolation on all levels
  8. Mutable vs Immutable 1. UI 2. 3rd party libs/Tools 3.

    Business logic 4. Backend protocol
  9. Divide et impera Presentation Layer MV*, UI Domain Layer Pure

    Java Data Layer Repository, Networking, Cache, etc. Use cases DAL
  10. Presentation Layer • Should be in separated module • Should

    not contain any business logic • Should depend on Domain (IoT) • MV* and UI goes here
  11. Domain Layer • You don’t need Android here • Pure

    Java only • Should not contain dependency on other modules
  12. Android as an Infrastructure • Build and initialize all other

    components • Provide dependencies • Connect Domain with Context and Lifecycle • Manage Android Components
  13. CI • NEVER provide builds manually • Run tests on

    every commit • Add all checks to CI
  14. Testing • Tests is also first class citizen • Tests

    as a part of documentation • In 2016 you will have no excuses not to write tests
  15. TDD

  16. Use metrics • Don't forget a meaning • Measure everything

    • It is not only about warnings • The Boy Scout Rule
  17. Technical dept • Do not afraid of refactoring • Include

    refactoring to every iteration • Test it! • Measure it!
  18. Documentation • If something is deprecated - @Deprecate it •

    JavaDoc your API • Tests is a part of Documentation
  19. Think in Java Android Accept the rules of the game

    ...or Google will break your app
  20. Summary • Application should be concentrated on Business Logic, not

    UI • Divide et impera • Architecture as a Process • In the next year everything will change