theapache64 / leancorn

A simple movie app, built using leanback.
Apache License 2.0
45 stars 6 forks source link

Mixing MVP with MVVM #1

Open nafr1 opened 2 years ago

nafr1 commented 2 years ago

Hello,

I am starting a TV application using Xamarin Android & Leanback. I was not able to find any decent example using Leanback along with MVVM implementation till I came across your implantation of Leanback using MVVM. I personally think that because of the current design of Leanback library, it kinda forces you to go with MVP route. Now I see that you have mixed both design patterns MVVM and MVP in your application. You think it's good idea? or should Leanback application only follows MVP pattern? Do you see any advantage of mixing MVVM and MVP with leanback?

theapache64 commented 2 years ago

Leanback doesn't force you to use MVP as your app architecture. Leanback uses MVP at the component level. so IMO, there's no harm in using MVVM with leanback. One of the major advantages wud be AAC ViewModel.It can help you to make your app more lifecycle aware.