Closed NabilLe123 closed 5 years ago
Conceptually the Model means "data" but according to the pattern or layers used in your system, the business logic will live in Use Case/Interactor, or Repositories or ViewModel (which will be a little weird because these classes have different responsibilities )if you're not using a domain layer.
In my defense, I did this sample when I was learning about MVVM but on these time arch components didn't exist, clean architecture and all this beautiful stuffs were borning, now you can find a lot of ways to split your architecture into different layers but the most important thing to remember is split data from UI.
Thanks for asking me!
According to explanation of MVVM at different websites, a Model in MVVM is the one that should be used for business logic. But fetchPeopleList() is essentially a business logic and its called inside a Viewmodel (PeopleViewModel.java) rather than in a Model.
Why is it so? Doesn't this disagree with the MVVM architecture?
** Sorry if I am wrong!!