Skip to content

Sample TMDB application to show what I've learn about MVI (Model View Intent) architecture pattern, with Coroutines and Livedata

License

Notifications You must be signed in to change notification settings

juangranadilla/movies-mvi

Repository files navigation

movies-mvi

This is a sample TMDB application to show what I've learned about MVI (Model View Intent) architecture pattern, applied in a clean architecture project, using the new integration between Coroutines and Architecture Components.

Dependencies

The application uses the following libraries:

Architecture

I'm using Clean Architecture, with Model View Intent as architecture pattern. To do so, I've structured the application in different modules like the following:

  • App module: is part of the presentation layer. It contains the application class, activities, and fragments, and set up the Koin (dependency injection) modules, so it depends on all modules.
  • Presentation module: contains ViewModels and view state models. It depends on the domain module.
  • Domain module: contains the use cases, actions, results, entities and repository interfaces. It has no dependency. It's the most inner part of "the onion"
  • Data module: contains repository implementations with different data sources (local, remote, cache). In this case, I only have a remote source and a simple local cache.

TMDB API

The app uses the https://www.themoviedb.org/ API, so you need to use your own API key. Just add your API key in the local.properties file like the following:

tmdb_api_key="your_api_key"

Kotlin DSL

I've also tried using Kotlin DSL instead of Groovy in Gradle files. And also used the Gradle Versions Plugin to check for available libraries updates, as Kotlin DSL Gradle files won't notify about that.

Screenshots

Useful links

License

Copyright 2019 Juan José Granadilla Manzano

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.