Separate your concerns with clean MVI

Tuesday 4:30 pm, Bagan Ballroom
Intermediate

About This Talk

Langauge : Myanmar

It’s become a norm to architect our codebases with either of the most popular architecture patterns. It’s even become a thing to have a hard time making decision on which pattern to pick given a number of options are available out there nowadays.

MVI is one of the latest to join the MV* gang in android Community. It best solves the state management problem by making the data/business logic drives the app’s state and leveraging data immutability. We’ll dive into the nitty-gritty of managing states the MVI way.

Views in android are already complex in its nature. MVI makes the view as dump and passive as possible to the point where the only concern left for a view is rendering data and firing events. Nothing more.

We’ll also go through a technique for building complex UI using a single recycler view with the help of Epoxy library which works very well with MVI. And of course, some caveats of using this library along with MVI.

Not necessarily a requirement but MVI shines the brightest when used together with reactive framework like Rxjava. Here’s the thing, simply using Rxjava doesn’t make your app reactive. You might have heard or seen something similar to this a couple of times, I’m using Rxjava/LiveData but still have to refresh the calls to get the latest updates when come back from another screen ¯_(ツ)_/¯. We’ll go through the process of making our app fully reactive. No more refresh.

Needless to advocate much for the benefits clean architecture has to offer. It’s here to stay. It ensures that components with different purposes will sit at their respective places thus enable us to concern about only one thing at a place. It makes sure the more important business logic doesn’t depend on the less important implementation details. The list goes on and on. On the other hand, MVI is just a view layer pattern so it still needs something which is capable of all these cool things. Then comes the clean MVI.

Note

To get the most out of this talk, audiences are expected to have working experiences in reactive framework, one or more of these architecture patterns: MVP,MVVM or better yet MVI and clean architecture. I’ve been playing around with clean+MVP, MVVM for the last couple of years and finally fell in love with MVI after trying it out on a couple of projects while working at Codigo. It’s helped me and my teammates produce more reasonable, less buggy codes with predictable app’s states. I’m simply excited to share those experiences with the community.

Photo of

Khun Zohn

Khun Zohn is a senior Android Developer at Codigo Myanmar. Before joining Codigo, he worked as Android Developer at Nexlabs . He self taught himself programming while studying Civil Engineering in University. Passionates about writing clean code and building apps with scalability, maintainability and testability in mind. Loves traveling around Shan-state or playing dota while not coding.

info@droidyangon.org

Android is a trademark of Google LLC. The Android, Google Play, Google Play logo, and
Google Inc.'s logo are registered trademarks of Google Inc.

© 2019 DroidYangon