Skip to content

pankajjangid/MovieDemo

Repository files navigation

Android VIPER Architecture Example (Kotlin)

This project teaches you how to use the VIPER Architecture In Android using Kotlin.In this project we are using the themoviedb.org

Within the framework of an Android app, the VIPER layers are assigned according to the following scheme:

N|Solid

Image credit: www.raywenderlich.com

Files description

Views

The View corresponds to an Activity or Fragment in the app. A goal is to make the View as dumb as possible, so that it only takes care of showing the UI.

Interactor

The Interactor takes care of performing any action, when the Presenter says to.

Presenter

The Presenter acts as a “Head-of-Department”. In other words, it commands any action making use of the Interactor, tells the View to display content, and orders the navigation to other screens using the Router.

Entity

The Entity represents the app data. In short, it acts likes the Model in the MVP architecture pattern.

Router

The Router handles navigating to other screens during the app lifecycle. Every view has a router with in so please check the views.

These are the main components of VIPER Architecture. In this project we use the Fuel HTTP library and for persistence storage we are using the Room Database.