xxxxxxxxxx
Android Clean Architecture (MVVM)
package structure:
root/
common/ // functionality shared across whole app
Constants.kt
data/ // data layer
remote/ // everything related to databases/remotes
including api implementations
dto/ // data received from remotes
repository/
domain/ // domain layer (buisiness logic)
model/ // data objects used by domain layer
repository/
use_case/ // contains functionality (buisiness logic)
first_use_case/ // one use_case for every functionality
second_use_case/
presentation/ // presentation layer (user interface)
first_screen/ // logic for first screen of application
components/ // can contain actual UI code
FirstViewModel.kt // ViewModel to store and persist state
of Views in Screen
second_screen/
components/
SecondViewModel.kt
xxxxxxxxxx
Android Clean Architecture (MVVM)
package structure:
root/
common/ // functionality shared across whole app
Constants.kt
data/ // data layer
remote/ // everything related to databases/remotes
including api implementations
dto/ // data received from remotes
repository/
domain/ // domain layer (buisiness logic)
model/ // data objects used by domain layer
repository/
use_case/ // contains functionality (buisiness logic)
first_use_case/ // one use_case for every functionality
second_use_case/
presentation/ // presentation layer (user interface)
first_screen/ // logic for first screen of application
components/ // can contain actual UI code
FirstViewModel.kt // ViewModel to store and persist state
of Views in Screen
second_screen/
components/
SecondViewModel.kt