This Android project is using a MVVM (Model-View-ViewModel) architecture, implemented with several different example observer patterns and data storage strategies.
This project is still under development, see the TODO
My name is Matthew Rohr, an Android Developer. I recently finished a two year contract working as an Android Developer/Consultant on the Hulu Android mobile app. I have been developing Android projects since 2012.
- LinkedIn Profile
- Past Projects (both personal and contracted)
This GitHub project was created and made public for a couple reasons:
Show & Tellfor tech/contracting interviews- Quick Reference Guide - As a contractor, moving between client Android tech stacks can be dizzying. In my experience, most clients are moving toward MVVM but still differ on how it is implemented. Having a quick reference for interview prep and development is helpful.
- FLOW/Coroutine Implementation - Been eager to play with this, to get an idea how it compares to RxJava. Loving it so far.
The data layer (observer choices and cache management) is the most complex part of the app. I have worked on numerous Android projects that moved toward MVVM but implemented the actual observer pattern and data storage strategy several different ways. This in part is why I included these as example implementations:
- Flow using Coroutines with Room DB
- RxJava with Room DB
- LiveData with an InMemCache
- Traditional Callbacks with an InMemCache - transitions into
LiveDatawithin theViewModelto help facilitate the MVVM architecture
Simple four screen app using the SpaceX Launches api:
Flow
LaunchFlowFragment <->
FlowViewModel <->
FlowRepository <-
(SpaceXDatabase ||
SpaceXApi)
RxJava
LaunchRxJavaFragment <->
RxJavaViewModel <->
RxJavaRepository <-
(SpaceXDatabase ||
SpaceXApi)
LiveData
LaunchLiveDataFragment <->
LiveDataViewModel <->
LiveDataRepository <-
(AgedMemoryCache ||
SpaceXApi)
Callbacks
LaunchCallbackFragment <->
CallBackViewModel <->
CallbackRepository <-
(AgedMemoryCache ||
SpaceXApi)
- MVVM Architecture
- Android Jetpack Components
- Kotlin & Extensions
- ViewModel
- RxJava (observer/data pattern example)
- LiveData (observer/data pattern example)
- Flow (observer/data pattern example)
- Traditional Callbacks (pattern example)
- Coroutines
- ConstraintLayout
- InMemory Cache
- ROOM Database (disk cache)
- Retrofit (for api communications)
- Picasso (for images)
- SpaceX API (free and easy to use)
- MocKK (testing library which is more friendly with Kotlin than Mockito)
Still lots todo on this project
Several files in this project are screaming to be Singletons, which I plan to implement with DI.
Last project I worked on used Toothpick for DI, but I personally would like to try Dagger, which appears to be a bit more main stream.
You can never have enough test coverage:
- Fragment Scenario Tests
- Additional Unit Tests
- Android Instrumentation Tests
This is fascinating and seems to work well with Androids new Navigation component



