Better Android Apps Using MVVM with Clean Architecture

, Software Pundits
This post was originally published on this site

Toptal

If you don’t choose the right architecture for your Android project, you will have a hard time maintaining it as your codebase grows and your team expands.

This isn’t just an Android MVVM tutorial. In this article, we are going to combine MVVM (Model-View-ViewModel or sometimes stylized “the ViewModel pattern”) with Clean Architecture. We are going to see how this architecture can be used to write decoupled, testable, and maintainable code.

Why MVVM with Clean Architecture?

MVVM separates your view (i.e. Activitys and Fragments) from your business logic. MVVM is enough for small projects, but when your codebase becomes huge, your ViewModels start bloating. Separating responsibilities becomes hard.

MVVM with Clean Architecture is pretty good in such cases. It goes one step further in separating the responsibilities of your code base. It clearly abstracts the logic of the actions that can be performed in your app.

Note: You can combine

To read the full article click on the 'post' link at the top.