|
|
|
|
|
by lawgimenez
1455 days ago
|
|
I am also an Android developer for over a decade. One thing I dislike about Android development is the fragmented way to do things. There was the support libraries v4, v7 and now the jetpack or androidx.* libraries. My UI is composed of different namespaces like androidx.drawerlayout.widget.DrawerLayout and com.google.android.material.appbar.MaterialToolbar. This is just confusing. Also you need to choose MVC, MVP, Viper, MVVM, AAC, RxJava, and now Jetpack Compose which completely is different compared to other architectures. But nonetheless I am excited with Jetpack Compose. |
|
Insofar as MVC, MVP, Viper, and MVVM - the vast majority of places I know of use MVVM. I can't think of many using MVC or Viper (a form of clean), and MVP is mostly used by older apps. Some places use clean architecture, which MVVM can work in conjunction with since the concentration is on different things.
Also most new projects I know of use coroutines and flow over RxJava, and plenty of RxJava projects are migrating to this as well.
Just like Clean can work with MVVM, so can Jetpack Compose - you just have a StateFlow (or LiveData) in a ViewModel with the UI model of the screen to display. So Jetpack Compose can work with MVVM, it is just a shift in thinking - and unidirectional data flow is being picked up for non-Compose Android projects too as it can make testing easier - instead of needing to fully rely on Espresso to test UI features, you can complement those tests with lots of JUnit unit tests on the UI model feeding into lean lifecycle components. Compose isn't different than MVVM, it can work with MVVM, it just modifies how MVVM is used.
Compose is also similar to reactive UI that other (non-Android) platforms use.