ber4444 / Android-MVVM-DataBinding-RxJava-Retrofit

7 stars 5 forks source link

MVVM pattern #1

Closed ddthanh198 closed 3 years ago

ddthanh198 commented 5 years ago

I don't think this peoject implement mvvm pattern Following https://www.vogella.com/tutorials/AndroidArchitecture/article.html, "The model class contains a data provider and the code to fetch and update the data. The data can be retrieved from different sources, for example: REST API Realm db SQLite db Handles broadcast Shared Preferences Firebase etc. Basically the same as the model in the MVP. " Why did you put them in ViewModel class?

ber4444 commented 3 years ago

Yes, it would be abstracted away in a repository. Update: done.