Architecture & patterns
MVVM/MVI comparisons, Jetpack architecture components, DI, Clean Architecture and where GoF patterns live in Android.
โฌโฌโฌโฌโฌ
1. MVC vs MVP vs MVVM vs MVI
architecturetheory
2. ViewModel, LiveData vs StateFlow, lifecycle-aware components
architecturejetpack
3. Dependency Injection: Hilt, Dagger, Koin
architecturedi
4. Clean Architecture & the Repository pattern
architecture
5. GoF design patterns in Android
patternstheory
๐ฏ Stage assignment
Stage project โ "build one screen properly" (3-4 hours).
Write an accounts-list screen from scratch with MVVM + Clean layers:
domain: theAccountmodel, theAccountRepositoryinterface, one use case. No Android imports in this package.data:AccountRepositoryImpl(fake data for now), anAccountDtoโAccountmapper.presentation: a@HiltViewModel+ a singleUiStatedata class + aStateFlow.- Wire up the Hilt module and verify the difference between
@Singletonand an unscoped binding. - Write at least 2 unit tests with a
FakeAccountRepository: the success and error paths.
Done when: the tests pass without an emulator (on the JVM) โ the simplest proof the architecture is right.