/ Apps

A sample Marvel heroes application based on MVVM

A sample Marvel heroes application based on MVVM

MarvelHeroes

MarvelHeroes is a demo application based on modern Android application tech-stacks and MVVM architecture.
Fetching data from the network and integrating persisted data in the database via repository pattern.

Download

Go to the Releases to download the lastest APK.

preview--1-

Tech stack & Open-source libraries

  • Minimum SDK level 21
  • Kotlin based + Coroutines for asynchronous.
  • JetPack
    • LiveData - notify domain layer data to views.
    • Lifecycle - dispose of observing data when lifecycle state changes.
    • ViewModel - UI related data holder, lifecycle aware.
    • Room Persistence - construct a database using the abstract layer.
  • Architecture
    • MVVM Architecture (View - DataBinding - ViewModel - Model)
    • Repository pattern
    • Koin - dependency injection.
  • Retrofit2 & Gson - construct the REST APIs.
  • OkHttp3 - implementing interceptor, logging and mocking web server.
  • Sandwich - construct lightweight http API response and handling error responses.
  • Glide - loading images.
  • TransformationLayout - implementing transformation motion animations.
  • WhatIf - checking nullable object and empty collections more fluently.
  • DiscreteScrollView - implementing a scrollable list of items.
  • Timber - logging.
  • Material-Components - Material design components like ripple animation, cardView.

Unit Testing Frameworks

Unit Tests verify the interactions of viewmodels between repositories and dao & REST api requests.

  • Robolectric - Robolectric is the industry-standard unit testing framework for Android.
  • Mockito-Kotlin - a small library that provides helper functions to work with Mockito in Kotlin.

79233416-cb12d700-7ea3-11ea-9a17-a4a732c379f4

Architecture

MarvelHeroes is based on MVVM architecture and a repository pattern.

77502018-f7d36000-6e9c-11ea-92b0-1097240c8689

GitHub

Comments