This document summarizes a new Android modularisation architecture with the following key points:
1. It defines core, dependency, and sub components including modules like listener, action, and animation.
2. The core component is provided by the "Coconut" base module. Dependency components include UI and data access layers. Sub-components depend on only one component.
3. Benchmark tests show improvements in memory usage, lines of code, and testability compared to the old architecture.
5. 2. Dependency Component
UIComponent , responsible for all UI logic, listener, action,
animation in View layer
DAOComponent , responsible for fetch data source in App ( local
DB, API source, cloud service) in Model layer
6. 3. Sub Component
SupportSubComponent , component that only depend 1
component for speci鍖c parent component that handle supporting tools
for UI
7. Listener Module
Action Module
Animation Module
Modules in
Support SubComponent
11. 4.a Navigation Module
Custom module base on work鍖ow from app
Should be clear and simple code (less code)
Only provide route movement manager to handle
transition between page (activity/ fragment)
12. 4.b Module
Interface model layer to fetch data source (DB, Cloud
storage, API)
Implementation modularisation in model layer
13. Code Implementation
De鍖ne all component and module in child Application
class
Build dagger component and module
Setup hierarchy component
De鍖ne method in module in interface as contract class