Skip to content

Android project that uses the MVVM pattern and Clean architecture to show a list of movies and their detail.

Notifications You must be signed in to change notification settings

JoseAngelManeiro/Movies-MVVM

Repository files navigation

Movies-MVVM

Android project that uses the MVVM pattern and Clean architecture to show a list of movies and their detail.

Architecture

This app uses Android Architecture components with Koin.

The architecture is divided into 3 layers:

Data

I use Repository implementations to control the flow of data access. In those repositories where there is more than one data source, the abstract class PrefetchLocalData guides the search according to the precept of Single source of truth.

Domain

This layer includes those models that are part of the project core (and are independent of the data layer) and the repository interfaces. Also belong the Interactors, which use repositories and models to accomplish the use case.

Presentation

This layer consists mainly of Activity-ViewModel pairs.

ViewModel

The ViewModel is the fundamental piece of the MVVM pattern. It exposes LiveData objects, which are lifecycle-aware, and thanks to this it can protect the state of the information in situations such as changing the orientation of the screen.

On the other hand, the management of asynchrony is done through an instance of InteractorExecutor, which is responsible for launching the execution of Interactors.

Activity

The Activity acts as a simple Observer of the data exposed by the ViewModel.

Testing

In this project I have focused mainly on covering with unit tests the classes that contain most of the logic of the app: ViewModels and Interactors.

About

Android project that uses the MVVM pattern and Clean architecture to show a list of movies and their detail.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages