O'Reilly logo

Android Development with Kotlin by Igor Wojda, Marcin Moskala

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Business logic implementation

We have both 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 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. 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 for reacting ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required