18. Benefit of layering
● Reducing scope of attention
● Increase testability
● Clearer responsibility
● One way direction dependency
19. But not good enough for modularization, because…
:UI
:Domain
:Data
20. What if by features?
:Store :Product :FeatureC
Store ui
Store view Model
Store repository
Store remote source
Store local source
21. What if by features?
:Store 20s :Product. 13s :FeatureC. 17s
:app. 5s
:Core. 4s
22. What if by features?
:Store :Product :FeatureC
Store ui
Store view Model
Store repository
Store remote source
Store local source
Product ui
Product view Model
Product repository
Product remote source
Product ui
Product remote source
Product local source
.
.
.
23. Why not depends on other feature?
:Store 20s :Product. 13s :FeatureC. 17s
:app. 5s
:Core. 4s
59S
27. Using api v.s. implementation
● api configuration will be transitively exposed to consumers of the library.
● implementation will not be exposed to consumer, and not leak into the consumer’s
compile classpath.
28. Using api v.s. implementation
Source : Android modularization preps things to know before modularizing