F
F
foonfyrick2021-02-18 17:23:43
Android
foonfyrick, 2021-02-18 17:23:43

Android mvvm template?

In all articles, the MVVM template implies the presence of live data, but does it have to be there?
And what should the ViewModel and Repository store in itself? Because I have seen different implementations in which methods from the Dao interface were passed first to the Repository and then to the ViewModel, why such a transfer of methods?
602e77a909814411242959.png
I took the hierarchy of creating folders and classes from the Internet, but in it, as shown above, first the methods from the Dao interface are called in the Repository class, then the repository methods are called in the ViewModel class, why not call them immediately from Dao in the ViewModel?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question