Skip to content

hasancse91/android-mvvm-hilt-blog-app

Repository files navigation

Android Blog Reading App [MVVM & Hilt]

Welcome to the Android MVVM+Hilt Blog Reading App repository! This project is a hands-on example of building a Blog Reading App using the Model-View-ViewModel (MVVM) architectural pattern and Dagger-Hilt dependency Injection. Dive into this practical project to enhance your Android development skills and get a taste of what you'll learn in the Android Dependency Injection with Hilt Course (Bengali). You can watch the course introduction and outline from here.

mvvm_app_demo.mp4

Table of Contents

Project Overview

The Android MVP Blog Reading App showcases how to structure and build an Android app using MVVM architecture with Dependency Injection Hilt. As you explore this repository, you'll gain practical insights into clean code, separation of concerns, and best practices in Android app development.

Features

This app showcases various features related to reading blogs, including:

Getting Started

To get started with the project, follow these steps:

  1. Clone the repository to your local machine:

    git clone https://github.com/hasancse91/android-mvvm-hilt-blog-app.git
  2. Open the project in Android Studio.

  3. Build and run the app on an emulator or physical device.

MVVM Architecture

The key components of the MVVM architecture include:

  • Model: Represents the data and business logic of the app.
  • View: Displays the UI and handles user input.
  • ViewModel: Acts as an intermediary between the Model and View, handling business logic and updating the observable field. Which observable field is being observed by View.

The MVVM architecture brings several benefits, including improved code maintainability, separation of concerns, and testability. Specially it overcomed the limitations of MVP architecture like: ViewModel reusability issue, lifecycle handle issue etc.

Hilt Implementation

  • Refactoring the MVVM project
  • Adding dependencies for Hilt
  • Annotate Application class using @HiltAndroidApp
  • Create @Module
  • Bind repository
  • Make Activity class as @AndroidEntryPoint
  • Prepare ViewModel for injection field

Thank you for exploring the Android Blog Reading App project! If you have any questions or suggestions, please feel free to reach out.

Happy coding!