First, what is MVP (ModelViewPresenter)?

View is a layer that displays data and reacts to user actions. On Android, this could be an Activity, a Fragment, an android.view.View or a Dialog.

is a layer that displays data and reacts to user actions. On Android, this could be an Activity, a Fragment, an android.view.View or a Dialog. Model is a data access layer such as database API or remote server API.

is a data access layer such as database API or remote server API. Presenter is a layer that provides the View with data from Model, also handles background tasks.

Most of the modern Android applications just use View-Model architecture. Programmers are involved in a fight with View complexities instead of solving business tasks. Using only Model-View in your application you usually end up with tightly coupled code, which translates into harder scalability. With the MVP approach it easier to understand the role of each element. You didn’t become a developer to be wasting time on boring code maintenance, but to build awesome stuff!

The story 🤓

After reading about android architectures (before this existed), especially MVP decided to give it a try, having no prior experience, I sought out after good quality technical articles to better translate the theory, into code.

Of all these articles I read, there was one that caught my attention the most, that’s Bourbon by Joe Birch. After reading the article and the code multiple times, I started getting the sense how advantageous following this pattern was, decoupling the View and the Domain layers kept the most common problems that come with badly architected software away. So that’s how the idea of writing the Avenging came to be, theory won’t get you anywhere anyway, it was time to open up Android Studio.

If you’re here, chances are you’ve already stumbled upon it, therefore I wrote this app similar to Joe’s, making it easier to understand each element without RxJava or Dagger (although the code may be similar, I’ll refrain from referencing the article too much, the idea is not having the reader jumping between the two articles).