An open API service indexing awesome lists of open source software.

https://github.com/hantrungkien/android-clean-architecture-components-boilerplate

Android Clean Architecture Components Boilerplate
https://github.com/hantrungkien/android-clean-architecture-components-boilerplate

android-architecture android-architecture-components butterknife clean-architecture dagger2 dagger2-android dagger2-mvp-rxjava design-patterns livedata mvp-architecture repository-pattern retrofit2 rxandroid2 rxjava2 solid-principles viewmodel

Last synced: 15 days ago
JSON representation

Android Clean Architecture Components Boilerplate

Awesome Lists containing this project

README

        

# Android Clean Architecture Components Boilerplate

Welcome 👋 I hope this boilerplate is not only helpful to other developers, but also that it helps to educate in the area of architecture. I created this boilerplate for a few reasons:

1. To experiment with modularisation
2. To experiment with the Android Architecture Components
3. To share some approaches to clean architecture, especially as we've been [talking a lot about it](https://academy.realm.io/posts/converting-an-app-to-use-clean-architecture/)
4. To use as a starting point in future projects where clean architecture feels appropriate

### Disclaimer

Note: The use of clean architecture may seem over-complicated for this sample project. However, this allows us to keep the amount of boilerplate code to a minimum and also demonstrate the approach in a simpler form.

Clean Architecture will not be appropriate for every project, so it is down to you to decide whether or not it fits your needs.

## Languages, libraries and tools used

* [Android Architecture Components (Room, ViewModel, LiveData)](https://developer.android.com/topic/libraries/architecture/index.html)
* Android Support Libraries
* [RxJava2](https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0)
* [Dagger 2 (2.17)](https://github.com/google/dagger)
* [Glide](https://github.com/bumptech/glide)
* [Retrofit](http://square.github.io/retrofit/)
* [AutoDimension](https://github.com/hantrungkien/AutoDimension)

## Architecture

The architecture of the project follows the principles of Clean Architecture. Here's how the sample project implements it:

![architecture](https://github.com/hantrungkien/android-clean-architecture-components-boilerplate/blob/master/picture/android-clean-arch.png?raw=true)


Drawing

## Conclusion

Again to note, use Clean Architecture where appropriate. That decision is down to you and the project that you are working on.

## Thanks

A special thanks go to the authors involved with these repositories, they were a great resource during our learning!

- https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html

- https://fernandocejas.com/2015/07/18/architecting-android-the-evolution/

- https://fernandocejas.com/2014/09/03/architecting-android-the-clean-way/

- https://medium.com/@dmilicic/a-detailed-guide-on-developing-android-apps-using-the-clean-architecture-pattern-d38d71e94029

- https://overflow.buffer.com/2017/10/13/package-feature-modularised-android-projects/

- https://proandroiddev.com/how-to-android-dagger-2-10-2-11-butterknife-mvp-part-1-eb0f6b970fd

- https://github.com/android10/Android-CleanArchitecture

- https://github.com/googlesamples/android-architecture

- https://github.com/bufferapp/clean-architecture-components-boilerplate

- https://github.com/vestrel00/android-dagger-butterknife-mvp