Git Product home page Git Product logo

microsoftassignment's Introduction

Microsoft Assignment

This repository contains a detailed sample app that implements MVVM architecture using Room, LiveData, Retrofit,DataBinding, ViewModel,RxJava.

Highlights

  1. MVVM Architectural pattern
  2. Offline Support
  3. Jetpack Components - Room, LiveData, DataBinding, Paging
  4. Unit test demonstration using JUnit and Mockito
  5. UI unit test demonstartion using Espresso
  6. Networking - Retrofit with RxJava
  7. Dependency Injection - Hilt

The application has been built with offline support. It has been designed using Android Architecture components with Room for offline data caching. The application is built in such a way that whenvever there is a service call, the result will be stored in local database.

The whole application is built based on the MVVM architectural pattern.

Application Architecture

alt text

The main advatage of using MVVM, there is no two way dependency between ViewModel and Model unlike MVP. Here the view can observe the datachanges in the viewmodel as we are using LiveData which is lifecycle aware. The viewmodel to view communication is achieved through observer pattern (basically observing the state changes of the data in the viewmodel).

image image

The app has following packages:

  1. models: It contains all the data accessing and manipulating components.
  2. api: It contains network calls and its interface.
  3. database: It contains entity and dao class for storing the data in local
  4. helper: It contains constant variables and common methods.
  5. ui: View classes along with their corresponding ViewModel.

Programming Practices Followed

a) Android Architectural Components
b) Hilt for Dependency Injection
c) MVVM
d) Retrofit with Okhttp
e) Room for data caching
f) JUnit and Mockito for Unit testing
d) Repository pattern

Classes have been designed in such a way that it could be inherited and maximize the code reuse.

Library reference resources:

  1. RxJava2: https://github.com/amitshekhariitbhu/RxJava2-Android-Samples
  2. Room: https://developer.android.com/topic/libraries/architecture/room.html

microsoftassignment's People

Contributors

hemasathiz avatar

Watchers

 avatar  avatar

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.