0

I couldn't find any source that answers this question directly:

Are Android Architecture Components made to follow an MVVM architecture (if implemented properly)? And if yes, which part of the app (Activity/Fragment, ViewModel, repository, database, web service) relates to "Model" "View" and "ViewModel"? The ViewModel class obviously belongs to the ViewModel layer, but what about the rest?

Florian Walther
  • 6,237
  • 5
  • 46
  • 104

1 Answers1

0

Your Activity or Fragment is your VIEW,particular activity/fragment viewmodel represents VIEWMODEL which contains all the business logic of your UI and Model/Repository represents MODEL which contains all the data related logics. You can manipulate data in model and can use Database,web services and Shared Preferences in the Model.

Abhishek Sharma
  • 271
  • 2
  • 11