Skip to content

GithubApp is a sample Android project using Github API based on MVVM architecture. It showcases the app development with well-designed architecture and up-to-date Android tech stacks. The MVVM arch using Coroutine, Dagger, and Android Jetpack.

Notifications You must be signed in to change notification settings

noor1yasser9/GithubApp

Repository files navigation

Github App

The MVVM arch using Coroutine, Daggar, and Android Jetpack.

Overview

GithubApp is a sample Android project using Github API based on MVVM architecture. It showcases the app development with well-designed architecture and up-to-date Android tech stacks.

kotlin coroutines Dagger 2 Kotlin-Android-Extensions MVVM

Model-View-ViewModel (ie MVVM) is a template of a client application architecture, proposed by John Gossman as an alternative to MVC and MVP patterns when using Data Binding technology. Its concept is to separate data presentation logic from business logic by moving it into particular class for a clear distinction. You can also check MVP

Why Promoting MVVM VS MVP:

  • ViewModel has Built in LifeCycleOwerness, on the other hand Presenter not, and you have to take this responsiblty in your side.
  • ViewModel doesn't have a reference for View, on the other hand Presenter still hold a reference for view, even if you made it as weakreference.
  • ViewModel survive configuration changes, while it is your own responsiblities to survive the configuration changes in case of Presenter. (Saving and restoring the UI state)

MVVM Best Pratice:

  • Avoid references to Views in ViewModels.

  • Instead of pushing data to the UI, let the UI observe changes to it.

  • Distribute responsibilities, add a domain layer if needed.

  • Add a data repository as the single-point entry to your data.

  • Expose information about the state of your data using a wrapper or another LiveData.

  • Consider edge cases, leaks and how long-running operations can affect the instances in your architecture.

  • Don’t put logic in the ViewModel that is critical to saving clean state or related to data. Any call you make from a ViewModel can be the last one.

    mvvm2

Visitor count


Screenshot

ss

🕹 Sample Video

android-emulator-pixel-4-api-29-2-5554-2021-08-13-17-21-26-td9kokgl-fado_RLQBbVV7_hAjI.mp4

✨ Features Project Android:

  • 100% Kotlin
  • Dagger Hilt
  • MVVM architecture
  • Android architecture components
  • Navigation Jetpack
  • Single activity
  • dataBinding
  • Coroutines

🌟 Features App

  • Offline support: app makes use of NetworkBoundResource, which uses database as the single source of truth
  • Advanced uses of Room
  • MVVM with Android Architecture Components(Room, LiveData, Stateflow, ViewModel)
  • Material design.
  • Dagger dependency injector

📃 Libraries used

Android Jetpack

Http

DI

Others

License

Copyright 2021 Noor Yasser

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

GithubApp is a sample Android project using Github API based on MVVM architecture. It showcases the app development with well-designed architecture and up-to-date Android tech stacks. The MVVM arch using Coroutine, Dagger, and Android Jetpack.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published