Business logic implementation

We have both the view and repository parts implemented and it is time to finally implement the business logic. On this point, we need only to get the character list and display it on the list when the user enters the screen or when they refresh it. We will extract these business logic rules from the view implementation by using an architectural pattern known as Model-View-Presenter (MVP). Here are the simplified rules:

  • Model: This is the layer responsible for managing data. The Model's responsibilities include using APIs, caching data, managing databases, and so on.
  • Presenter: The Presenter is the middle man between Model and View, and it should include all your presentation logic. The Presenter is responsible ...

Get Android Development with Kotlin now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.