Open ms-dehghani opened 1 year ago
Could you please specify the module names that we might need in the project?
For example app
, domain
, feature:sample:ui
, feature:sample:presentation
... and visualize it using a diagram?
this is a tree view:
|- App |-> Main page, menu and navigate to each feature |- Utilitys |--> TextFormatter |--> NumberFormatter |- Models |-- Model1 |---> POJO (public) |---> DI (private) |--- Repo |----> Repo (public) |----> RepoImpl (private) |---- Network (private) |-----> NetworkAPI (RepoImpl) |-----> NetworkMock (RepoImpl) |---- Database (private) |-----> DatabaseAPI (RepoImpl) |-- Model2 |---> POJO (public) |---> DI (private) |--- Repo |----> Repo (public) |----> RepoImpl (private) |---- Network (private) |-----> NetworkAPI (RepoImpl) |---- Database (private) |-----> DatabaseAPI (RepoImpl) |-----> DatabaseMock (RepoImpl) |- Domain |--> UseCase1 (public) |--> UseCase2 (public) |- Features |-- Feature1 |--> UI |--> State (ViewModel) |-- Feature2 |-- Feature3 |-- Feature4
Recently we searched about modular layer in android. we can use google recommended layer system. At first google suggest if your app not big enough don't use modular system and use simple one. If we assume our application big enough we can use it. There is summery point to create modular app:
This is sample of madular application: https://developer.android.com/static/topic/modularization/images/1_sample_dep_graph.png
There is some common modules:
for more information you can use official doc: https://developer.android.com/topic/modularization