Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ferhatozcelik authored Aug 8, 2023
1 parent c0c6f8e commit fbb191d
Showing 1 changed file with 31 additions and 55 deletions.
86 changes: 31 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,73 +1,49 @@
# Android MVVM Template

#### A simple Template showing the use of modern android architecture component with MVVM Architecture 🏗
![GitHub](https://img.shields.io/github/license/ferhatozcelik/android-mvvm-template)
![GitHub stars](https://img.shields.io/github/stars/ferhatozcelik/android-mvvm-template?style=social)

### Project Architecture
This is an Android project template that demonstrates the use of the MVVM (Model-View-ViewModel) architecture along with modern Android architecture components. It provides a structured starting point for building Android applications that are maintainable, testable, and scalable.

This app uses [MVVM (Model View View-Model)] architecture.
## Project Architecture

### MVVM (Model View View-Model)
MVVM stands for "Model-View-ViewModel" and it is an architectural pattern used in Android app development. Here's a brief explanation of each component:
This app follows the MVVM architecture pattern, which stands for "Model-View-ViewModel." Here's an overview of each component:

- Model: The Model represents the data and business logic of the application. It can include data structures, databases, APIs, or any other data-related logic. The Model should be independent of the user interface and the View.
- View: The View represents the user interface elements of the application. It displays the data from the Model and interacts with the user. In Android, it typically consists of XML layout files and UI components like TextViews, Buttons, RecyclerViews, etc.
- ViewModel: The ViewModel acts as an intermediary between the Model and the View. It is responsible for exposing the data from the Model to the View in a format that the View can easily consume. The ViewModel also contains the presentation logic and handles user interactions. It should not hold references to the View, making it independent of the UI framework.
- **Model:** Responsible for data and business logic. Independent of UI.
- **View:** Displays UI elements and interacts with users.
- **ViewModel:** Acts as a bridge between Model and View. Manages data presentation and user interactions. UI-independent.

MVVM promotes separation of concerns and makes the code more maintainable, testable, and scalable. It also facilitates data binding, where changes in the ViewModel are automatically reflected in the View and vice versa.
In Android development, MVVM is often implemented using frameworks like LiveData for data observation and Data Binding for connecting the View and ViewModel.
MVVM promotes separation of concerns, making your codebase more organized and easier to manage. It also supports data binding, automatic synchronization of data between ViewModel and View, and allows for more effective testing.

## Technologies and Libraries Used

### Build With 🏗️
- [Kotlin](https://kotlinlang.org/): Programming language for Android development.
- [Hilt-Dagger](https://dagger.dev/hilt/): Dependency injection library for Android.
- [Retrofit](https://square.github.io/retrofit/): Type-safe HTTP client for networking.
- [Room](https://developer.android.com/training/data-storage/room): SQLite object mapping library for local data storage.
- [Coroutines](https://kotlinlang.org/docs/reference/coroutines-overview.html): Asynchronous programming using Kotlin's coroutine framework.
- [LiveData](https://developer.android.com/topic/libraries/architecture/livedata): Observable data holder class for UI components.
- [ViewModel](https://developer.android.com/topic/libraries/architecture/viewmodel): Stores UI-related data that survives configuration changes.
- [ViewBinding](https://developer.android.com/topic/libraries/view-binding): Generates binding classes for XML layout files.
- [Jetpack Navigation](https://developer.android.com/guide/navigation): Handles navigation between different parts of the app.

- [Kotlin] - Programming language for Android
- [Hilt-Dagger] - Standard library to incorporate Dagger dependency injection into an Android
application.
- [Retrofit] - A type-safe HTTP client for Android and Java.
- [Room] - SQLite object mapping library.
- [Coroutines] - For asynchronous
- [LiveData] - Data objects that notify views when the underlying database changes.
- [ViewModel] - Stores UI-related data that isn't destroyed on UI changes.
- [ViewBinding] - Generates a binding class for each XML layout file present in that module and
allows you to more easily write code that interacts with views.
- [Jetpack Navigation] - Navigation refers to the interactions that allow users to navigate across,
into, and back out from the different pieces of content within your app
## Getting Started

[ViewModel]: <https://developer.android.com/topic/libraries/architecture/viewmodel>
1. Clone this repository: `git clone https://github.com/ferhatozcelik/android-mvvm-template.git`
2. Open the project in Android Studio.
3. Build and run the app.

[Jetpack Navigation]: <https://developer.android.com/guide/navigation/>
Feel free to customize and extend this template to match the requirements of your specific project.

[Hilt-Dagger]: <https://dagger.dev/hilt/>

[DataStore]: <https://developer.android.com/topic/libraries/architecture/datastore>

[ViewBinding]: <https://developer.android.com/topic/libraries/view-binding>

[LiveData]: <https://developer.android.com/topic/libraries/architecture/livedata/>

[Retrofit]: <https://square.github.io/retrofit/>

[ViewModel]: <https://developer.android.com/topic/libraries/architecture/viewmodel>

[Kotlin]: <https://kotlinlang.org>

[Coroutines]: <https://kotlinlang.org/docs/coroutines-overview.html>

[MVVM (Model View View-Model)]: <https://developer.android.com/jetpack/guide#recommended-app-arch>

[Dictionary Api]: <https://api.dictionaryapi.dev/>

[Room]: <https://developer.android.com/training/data-storage/room/>

### Author
## Author

👤 Ferhat OZCELIK

Github: @ferhatozcelik
LinkedIn:https://www.linkedin.com/in/ferhatozcelik/
Show your support
Give a ⭐️ if this project helped you!
- GitHub: [@ferhatozcelik](https://github.com/ferhatozcelik)
- LinkedIn: [Ferhat OZCELIK](https://www.linkedin.com/in/ferhatozcelik/)

## License

### License
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.

Copyright © 2022 Ferhat OZCELIK.
This project is Apache License, Version 2.0 (the "License") licensed.
If you found this template helpful, please consider giving it a ⭐️ on GitHub. Your support is greatly appreciated!

0 comments on commit fbb191d

Please sign in to comment.