/kotlin101-app-architecture

📐 Kotlin 101: App Architecture

Primary LanguageKotlin

App Architecture

Overview

This project is part of the Master Class: Android Kotlin 101 and demonstrates a simple example of structuring an Android application using the MVVM (Model-View-ViewModel) architecture. The goal is to provide a clear and practical understanding of how to implement MVVM in Android using Kotlin.

Features

  • MVVM Architecture: Separation of concerns between UI, business logic, and data handling.
  • State Management: Use of StateFlow for reactive UI updates.
  • Dependency Injection: Integration with Koin for managing dependencies.

Project Structure

1. Model

  • Contains data classes representing the application's data.
  • Example: Movie class for movie details.

2. ViewModel

  • Handles business logic and exposes state to the UI.
  • Example: MovieViewModel for managing movie data and search functionality.

3. View

  • Composables and activities that observe the ViewModel and render the UI.
  • Example: MovieScreen and MovieItem composables.

4. Repository

  • Abstracts data handling logic.
  • Example: MovieRepository for managing local movie data.

Technologies Used

  • Kotlin: Programming language for Android development.
  • Jetpack Compose: Modern UI toolkit for building declarative UIs.
  • Koin: Dependency injection framework.
  • StateFlow: Reactive state management.