Skip to content

Aditya-QSS/HomeWorkMVVMTask

Repository files navigation

HomeWorkMVVMTask

-I created this repository for user login using Jetpack Compose and used Room database to save user.

Libraries Used

  • Architecture - A collection of libraries that help you design robust, testable, and maintainable apps.
    • Lifecycles - Create a UI that automatically responds to lifecycle events.
    • Navigation - Handle everything needed for in-app navigation.
    • ViewModel - Easily schedule asynchronous tasks for optimal execution.
    • Coroutines - A coroutine is a concurrency design pattern that you can use on Android to simplify code that executes asynchronously.
    • Flow - Works very well with coroutines, provides us with cold streams which can be transformed using well known reactive operators.
  • UI - Details on why and how to use UI Components in your apps - together or separate
  • Third party and miscellaneous libraries
    • Volley for turns your HTTP API into a Java interface
    • Room provides an abstraction layer over SQLite to allow fluent database access while harnessing the full power of SQLite.
    • Gson for convert Java Objects into their JSON representation
    • Hilt for dependency injection

App Video

Demo.mp4

Architecture

The app uses MVVM architecture to have a unidirectional flow of data, separation of concern, testability, and a lot more.

Architecture

Repository

A class that you create, for example using the WordRepository class. You use the Repository for managing multiple data sources.

Room Database

Database layer on top of SQLite database that takes care of mundane tasks that you used to handle with an SQLiteOpenHelper. Database holder that serves as an access point to the underlying SQLite database. The Room database uses the DAO to issue queries to the SQLite database.

Entity

When working with Architecture Components, this is an annotated class that describes a database table.

SQLite database

On the device, data is stored in an SQLite database. For simplicity, additional storage options, such as a web server, are omitted. The Room persistence library creates and maintains this database for you.

DAO

Data access object. A mapping of SQL queries to functions. You used to have to define these painstakingly in your SQLiteOpenHelper class. When you use a DAO, you call the methods, and Room takes care of the rest.

Kotlin

Kotlin is an open-source, statically-typed programming language that supports both object-oriented and functional programming. Kotlin provides similar syntax and concepts from other languages, including C#, Java, and Scala, among many others. Kotlin does not aim to be unique — instead, it draws inspiration from decades of language development. It exists in variants that target the JVM (Kotlin/JVM), JavaScript (Kotlin/JS), and native code (Kotlin/Native).

LiveData

A data holder class that can be observed. Always holds/caches latest version of data. Notifies its observers when the data has changed. LiveData is lifecycle aware. UI components just observe relevant data and don’t stop or resume observation. LiveData automatically manages all of this since it’s aware of the relevant lifecycle status changes while observing.

Coroutines

Coroutines are a great new feature of Kotlin which allow you to write asynchronous code in a sequential fashion. … However, like RxJava, coroutines have a number of little subtleties that you end up learning for yourself during development time, or tricks that you pick up from others.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages