Skip to content

kamilmasyhur/marvel-mvi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Marvel MVI

Created Android App using Marvel API to learn about MVI (Model-View-Intent) Architecture.

Screen Shot 2021-09-26 at 11 34 36 AM image image

What is MVI?

MVI stands for Model-View-Intent. MVI works in a very different way compared to its distant relatives, MVC, MVP or MVVM. The role of each MVI components is as follows:

  • Model represents a state. Models in MVI should be immutable to ensure a unidirectional data flow between them and the other layers in your architecture.
  • Like in MVP, Interfaces in MVI represent Views, which are then implemented in one or more Activities or Fragments.
  • Intent represents an intention or a desire to perform an action, either by the user or the app itself. For every action, a View receives an Intent. The Presenter observes the Intent, and Models translate it into a new state.

Getting Started

Prerequisite

  • Android Studio Download here
  • Gradle 7.0.2
  • Register Marvel API, here.

Built with

What we used here:

  • Kotlin
  • RxJava2
  • Retrofit
  • Coil
  • Hilt

Project Setup

  1. Getting API Key from Marvel API
  2. Open or create gradle.properties file in your root project.
  3. Edit to put your API key:
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
android.useAndroidX=true
android.enableJetifier=true
kotlin.code.style=official
base_url="https://gateway.marvel.com:443/"
public_key="public_key_here"
private_key="private_key_here"
  1. Rebuild or Re-open the project.

How to start?

Start learning from these branches:

Authors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages