For many years, MVP was the most widely used presentation pattern to isolate the user interface from business logic until a new opponent for this architecture emerged. We are talking about the MVVM architecture

Many people don’t know if they should ditch MVP or what to do when they start a new app. These are some tips when facing a new project:

  • You have to know that MVP is not dead. It is still a perfectly valid pattern that you can continue to use as before.
  • MVVM as a pattern is not strictly better. The implementation that Google made with MVVM makes sense, but it does not mean that MVP is wrong, it was simply used because it fits very well with the Android framework and with little complexity.
  • Using MVP does not mean that the rest of the components of the architecture cannot be used. The ViewModel probably doesn’t make much sense in the MVP architecture as it’s the natural replacement for the presenter, but the rest of the components can be used in one way or another
  • You don’t need to refactor your app right away. If you hit with MVP, continue with him. While it’s true that MVVM provides more scalability, in general, it’s better to maintain a solid architecture rather than have all the new trends implemented on different screens of the application. Doing such refactoring could be very expensive.

In conclusion, whether you decide to use MVP or MVVM is up to you. I don’t think there is a need to migrate an entire architecture if it is already solved using MVP, but keep in mind that it is important to know how MVVM works because you will surely use it in the future as it has many advantages.

Lucas Palavecino

Sr Android Developer