/DemoApp

Primary LanguageKotlinApache License 2.0Apache-2.0

Demo APP

This is an android demo project trying to demonstrates best practices, however due to time constraint a lot has been left unfinished.

  • No tests have been added
  • A lot of code repetitions and bad practises

Basically this is work in progress

Environment Setup

First off, you require the latest Android Studio Chipmunk (or newer) to be able to build the app.

Architecture

The architecture of the application is based, apply and strictly complies with each of the following 5 points:

  • A single-activity architecture.
  • Android architecture components, part of Android Jetpack for give to project a robust design, testable and maintainable.
  • Pattern Model-View-ViewModel ( MVVM) facilitating a separation of development of the graphical user interface.
  • S.O.L.I.D design principles intended to make software designs more understandable, flexible and maintainable.
  • Modular app architecture allows to be developed features in isolation, independently from other features.

Tech-stack

Min API level is set to 21, so the presented approach is suitable for over 98% of devices running Android. This project takes advantage of many popular libraries and tools of the Android ecosystem. Most of the libraries are in the stable version unless there is a good reason to use non-stable dependency.

  • Jetpack:
    • Android KTX - provide concise, idiomatic Kotlin to Jetpack and Android platform APIs.
    • AndroidX - major improvement to the original Android Support Library , which is no longer maintained.
    • View Binding - allows you to more easily write code that interacts with views/
    • Lifecycle - perform actions in response to a change in the lifecycle status of another component, such as activities and fragments.
    • LiveData - lifecycle-aware, meaning it respects the lifecycle of other app components, such as activities, fragments, or services.
    • ViewModel - designed to store and manage UI-related data in a lifecycle conscious way. The ViewModel class allows data to survive configuration changes such as screen rotations.
  • Coroutines - managing background threads with simplified code and reducing needs for callbacks.
  • Coroutines Flow - cold asynchronous data stream that sequentially emits values and completes normally or with an exception
  • Dagger2 - dependency injector for replacement all Factory classes.
  • Retrofit - type-safe HTTP client.