Giter Club home page Giter Club logo

yvdemoapp's Introduction

Master Detail Application

A Demo App to consume an API service Randomuser.me API and display data

About

The Demo App is written in Kotlin and requires minimum Android API 21+.

Developed using Android Studio 4.2 Beta 6 with Gradle Wrapper 6.7.1 and AGP 4.2.0-beta06

Usage

It's a basic implementation of two screens

Master screen with 500 user pictures and names. Uses `seed` value `yv` in API call
Detail screen with user picture and details 

There's a pull to refresh on the main screen in case an error occurs and data needs to be refetched.

Demo

Architecture

The app is implemented using a clean architecture approach

Data, Domain and App (Presentation) layers each have their own modules with separation of concerns

Domain layer is the inner-most with commonly shared models, interfaces and use cases

Data layer has the network and repository classes

The app (presentation) layer has the ViewModels and UI

These Android Architecture components are used - MVVM, LiveData, Navigation, new View Binding

Dependencies

All dependencies are referenced in common\dependencies.gradle

DI - I chose the new Hilt library as it's easier to integrate than Dagger and still supports the required features

Image Loading - Coil is a new Kotlin-first image loading library with good performance

RxJava2 - for network calls

Unit tests - Mockito and Mockk

Unit tests and code coverage

Classes with significant business logic have unit tests - UsersViewModel and UserResponseMapper

DemoAppCoverage1.pngimage VMCoverage.pngimage MapperCoverage.pngimage

Improvements and Modifications

DB caching can improve data persistence. This would live inside the data module.

Use Coroutines with Flow instead of RxJava

yvdemoapp's People

Contributors

azaka01 avatar

Watchers

 avatar

yvdemoapp's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.