This software was developed using an Agile and TDD methodology

Related tags

App VM-EmpDirectory
Overview

VM-EmpDirectory

Software Development Approach

This software was developed using an Agile and TDD methodology

Architecture Design

The Project follows a MVVM with Repository pattern architecture. This architecture was chosen for:

  • Separation of Concerns that provides a way to testing the architecture components in isolation and allows for the View classes to be updated without modifying the ViewModel classes.\
  • Resilience to configuration changes allows the ViewModel classes to store UI data that would otherwise be lost on screen rotation or activity lifecycle changes.
  • Communication between fragments using a ViewModel class removes the need for fragments to communicate via an Activity using callbacks.

The View classes use data binding to communicate updates to their respective ViewModel classes. The ViewModel classes communicate with a Repository class using coroutines and receives responses using LiveData. This is then passed back to the View classes observing this LiveData. The Repository class communicates with a RESTful API using Retrofit and caches the response to a local Room database.

Test Cases

Espresso provides End-to-End testing of the application and network calls. Test cases included:

  • Testing the Fragment and RecyclerView\

Mockito testing provides Unit testing of the ViewModel and Repository dependencies. Test cases included:

  • Testing the coroutine launch function in the MainViewModel and the PeopleRepository classes
  • Testing the dependency interactions between the MainViewModel and PeopleRepository classes
  • Testing the dependency interactions between the MainViewModel and the PeopleDao interfaces

Libraries Used

  • Koin to provide constructor dependency injection to classes in the application
  • Retrofit to provide access to the backend API endpoints
  • Coroutines to run API network requests on background threads
  • AndroidX to provide Lifecycle and LiveData functionality to the app
  • Room to store the People responses from Retrofit
  • Data binding to bind the inflated layout files to instances running in the application code.
  • Espresso to perform instrumentation tests on the user interface
  • Mockito to mock the MainViewModel and PeopleRepository classes

Alternative Libraries

For instrumentation testing Robolectric could be used and for unit testing the MockK would be ideal since it uses Kotlin DSL to support mocking test cases. Volley could be used as an alternative networking library for Retrofit and lastly, Dagger Hilt could be used as an alternative dependency injection library.

Further Improvements

  • Refactor project to use Pagination 3 that has been developed with Kotlin coroutines in mind.
  • Implement a Bottom Navigation that contains an about People fragment and a Rooms fragment. device-2021-12-22-003120 device-2021-12-22-000647
You might also like...
Pokedex - Pokedex demo application developed using Hilt, Coroutines, Jetpack Compose, View Model, Coil, Accompanist, Material Design based on MVVM atchitecture It is a NBAApp developed by Kotlin. It uses MVVM design pattern, Coroutines, Retrofit and JetPack libraries like Room, Lifecycle, ViewBinding, DataBinding, Hilt and Navigation.
It is a NBAApp developed by Kotlin. It uses MVVM design pattern, Coroutines, Retrofit and JetPack libraries like Room, Lifecycle, ViewBinding, DataBinding, Hilt and Navigation.

NbaApp It is a NBAApp developed by Kotlin. It uses MVVM design pattern, Coroutines, Retrofit and JetPack libraries like Room, Lifecycle, ViewBinding,

MovieStreaming - Movie Streaming is a streaming app and  developed with Kotlin and Koin Dependency injection
MovieStreaming - Movie Streaming is a streaming app and developed with Kotlin and Koin Dependency injection

MovieStreaming Movie Streaming is a streaming app and developed with Kotlin and

ToDo list is a sample project for save task and complete they. developed with Kotlin , Coroutins and Dagger-Hilt Dependency injection.
ToDo list is a sample project for save task and complete they. developed with Kotlin , Coroutins and Dagger-Hilt Dependency injection.

ToDo list is a sample project for save task and complete they. developed with Kotlin , Coroutins and Dagger-Hilt Dependency injection.

This is an android project developed in order to practice and prepare for the Google AAD Exam
This is an android project developed in order to practice and prepare for the Google AAD Exam

TaskMaker This is an android project developed in order to practice and prepare for the Google Associate Android Developer Exam (AAD). I tried to impl

Vanilla Music Player for Android (abandoned). Visit https://github.com/vanilla-music/vanilla for an actively developed fork

Translating You can help translate here. If your language isn't on the list, open an issue and I can add it. Building To build you will need: A Java c

A Simple Calculator developed in Kotlin
A Simple Calculator developed in Kotlin

Calculator developed in Kotlin This was my first contact with mobile programming using Kotlin. The calc is basic, but it was the first project I did.

Project developed for monitoring hard braking zones as a scientific initiation at Facens in the period 2021/2022

@hard-braking-zones/location Project developed for monitoring hard braking zones as a scientific initiation at Facens in the period 2021/2022. Install

Owner
null
MovieApp with TDD, Clean Architecture & Jetpack Compose

MovieApp This app uses TMDB's multi search API to fetch polymorphic json response. Application shows the different media types returned from the API i

M Saif Ullah 1 Oct 13, 2022
OSGeo4A is a build environment to cross-compile opensource GIS software for android devices

OSGeo4A This provides a set of scripts to build opensource geo tools for Android. This is Experimental Dependencies instructions you need a JDK v8 or

OPENGIS.ch 31 Aug 5, 2022
Money Manager Ex is a free, open-source, cross-platform, easy-to-use personal finance software

Money Manager Ex is a free, open-source, cross-platform, easy-to-use personal finance software. It primarily helps organize one's finances and keeps track of where, when and how the money goes.

Money Manager EX 1.2k Dec 31, 2022
Copylefted libre software (GPLv3+) card management app

Catima Copylefted libre software (GPLv3+) card management app. Logo by Rose (TangentFoxy) Stores your store loyalty and membership cards on your devic

Catima 402 Jan 4, 2023
Game project in TDT4240 Software Architecture

Star Battle NTNU Intergalactic space warfare - Game project in TDT4240 Software Architecture View Demo Table of Contents About the Project Tech Stack

William H. Le 3 Sep 28, 2022
📱 Andriller - is software utility with a collection of forensic tools for smartphones

Andriller - is software utility with a collection of forensic tools for smartphones. It performs read-only, forensically sound, non-destructive acquisition from Android devices. It has features, such as powerful Lockscreen cracking for Pattern, PIN code, or Password; custom decoders for Apps data from Android (some Apple iOS & Windows) databases for decoding communications. Extraction and decoders produce reports in HTML and Excel formats.

Denis Sazonov 980 Dec 27, 2022
Design patterns are typical solutions to common problems in software design

Design patterns are typical solutions to common problems in software design. Each pattern is like a blueprint that you can customize to solve a particular design problem in your code.

hamid 4 Aug 30, 2022
Anxiety free news reader for Android - developed using Kotlin

Android River is a modern Android 2.2 news app. It's now version 1.15. Android River has the following features: Read RSS 1.0, RSS 2.0 and ATOM 1.0. C

Dody Gunawinata 319 Nov 10, 2022
The application is developed using Modern tools/libraries with UI implementations with Navigation architecture

This is mobile application which actual users will interact with. The application is developed using Modern tools/libraries with UI implementations with Navigation architecture. It connects with the Dog API to retrieve data. more detail of api can be found here - https://dog.ceo/dog-api/documentation/random This project a basic example of Retrofit and mvvm

null 4 Feb 3, 2022