Android Architecture Blueprint is a project that follows Clean Architecture principles and MVVM pattern to develop Android apps.
- Install Android
- Android documentation
- The Clean Architecture (Uncle Bob)
- MVVM pattern
- Room
- Coroutines
- RxKotlin
- Retrofit
- Dagger (Dependency Injection)
- Mockito
- Espresso
Android
- Android 5.1+
- minSdkVersion 23
- targetSdkVersion 30
There are 3 main modules to help separate the code. They are Data, Domain, and Presentation.
-
Data (Particular project): contains Local/Remote Data Source, APIs, Data objects (Request/Response object, DB objects), and the repository implementation.
-
Domain (Particular project): contains UseCases, Domain Objects/Models, and Repository Interfaces
-
Presentation: contains UI, app style, app configurations, View Model (hold view state and presentation logic), etc. Can be split into separate modules itself if needed. For example, we could have a module called Device which handles platform things such as camera, location, etc.
- Enterprise-wide business rules
- Made up of classes that can contain methods
- Business objects of the application
- Used application-wide
- Least likely to change when something in the application changes
- Bridge between Data layer and Domain layer
- Connects to data sources and returns mapped data
- Data sources include DB, Api etc...
- Responsible for connecting to repository to retrieve necessary data.
- This is where the business logic takes place.
- Returns data downstream.
- Single responsibility.
- Organizes data and holds View state.
- Communicate with use cases.
- Observes changes from ViewModel.
- Updates UI.
- Fetch data from json files.
assets/data/cards.json
assets/data/components.json