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

The Android Architecture

The Android Architecture

Slides for DroidYangon2019

More Decks by မျိုးလွင်ဦး

Other Decks in Programming

Transcript

  1. Separation of concerns(SoC) • Don’t write all your code in

    an Activity or a Fragment • Separate into sections • Encapsulate informations
  2. Issues • Limited resource • UI controllers are not for

    business logic • You don't own implementations of Activity and Fragment • Destroyed after configuration changes • Potential memory leaks • Hard to test • Hard to maintain • And extending your app is more difficult
  3. If you shouldn't use app components to store app data

    and state, how should you design your app?
  4. Clean Architecture, Chapter 15 “A good software architecture allows the

    system to be easy to understand, to develop, to maintain and to implement.”
  5. • Describe business logic • Data operation • Define data

    manipulation Model • Represent UI components • Display the data from Controller View • Coordinate between View and Model Controller
  6. ViewModel From AAC • Replace loaders • Manage UI-related data

    in a lifecycle conscious way • Survive configuration changes