• Bojan Belic

IAA_3-rev: Reconsidering MVP for Android

** This article has been ported over from my Medium blog. - Original time of writing: Jun 11, 2019 **

I’ll be honest, I haven’t posted an update in a very long time now which has rendered the draft I originally made for IAA_3 useless. Beginning of last year, I published a library on Github named Substratum, which had the intention of simplifying the originally explained MVP-principle for usage on Android. The library is still available for use, but I would honestly recommend against using it as time moves fast in the mobile world and there are plenty of better options available now.

Architecture is important

To give a bit more background, the Android Framework developers finally realised that the community also needs some guidance in regards to architecture, and that proper integration within the whole ecosystem is important.

On the 6th of November 2017, version 1.0 of the Android Architecture Components (AAC) was released which was alright. But as time went on, they kept introducing newer & better concepts to the AAC which has made it into a good addition to your development tools which I highly recommend using. The Android Framework team chose to base their architectural designs on the MVVM-principle as well, which works really well for Android.

Don’t misunderstand though, despite that AAC is tailored for use with the MVVM-principle, it can be applied to MVP as well so as an architecture it’s not deprecated in any sense. MVVM is just a natural evolution and can make development in the long run a lot less verbose and easier to manage.

The King is dead, long live the King

So instead of wasting both our time on explaining how Substratum works, I will start IAA_4 as an introduction on how to build a proper MVVM-based application using the AAC and other libraries to make sure your app will be future-proof and production-ready. And dread not, a lot of the concepts introduced in the IAA's before still apply to MVVM and will give you a better understanding of the strengths (and weaknesses) of MVVM.