Coder Social home page Coder Social logo

islamarr / recorder Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 341 KB

Simple Recorder Application

Kotlin 100.00%
mvvm android livedata viewmodel hilt hilt-dependency-injection-android repository-pattern navigation-architecture-component data-binding unittesting clean-architecture modules modularization

recorder's Introduction

Recorder

About this project:

1- Kotlin
2- MVVM
3- LiveData
4- ViewModel
5- Hilt DI
6- Repository pattern
7- Navigation component
8- Data Binding
9- Room DB
10- Coroutines
11- Unit testing (local tests + instrumented tests)

architecture pattern

Technical choices

RecyclerView vs Listview

  • In RecyclerView, it is mandatory to use ViewHolder pattern Which optimize the performance.
  • DiffUtil callback Which optimize the performance.
  • There is no official way to implement a horizontal ListView. But in RecyclerView by using Layout Manager you can do vertical, Staggered or Gridlayout

Activities vs Fragments

  • I have used a single-activity architecture which allowed me to take full advantage of the Navigation component, which mean that a single activity that manages and host multiple fragments.
  • The fragment is more lite weight than Activity.

ViewModel vs AndroidViewModel

AndroidViewModel is a Application context aware ViewModel. As I didn't need to use context inside my ViewModel classes, I've used ViewModel.

Unit test vs instrumented test

In cases where I wanted to test the behavior of some screens in a real device I used instrumented test by Espresso and Mockito. In the functions I didn't need a physical device I used the local Unit Tests.

Hilt vs Dagger2 vs Koin

  • Hilt does not need factories for ViewModel , Dagger need
  • Hilt generate the code in the compile time , koin runtime generation code

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.