Where to fit the Network layer and Offline store management in MVVM architecture?
MVVM(Model, View, ViewModel) is considered to be a better architecture than MVC. I map my classes to MVVM as below:
ViewControllers, Views -----> VIEW Model entities ----> MODEL ViewModel of each view ---> VIEW MODEL
Network Calls --- ???? Core data layer --- ???
I have packed the network calls as class functions in a separate class and using it with in ViewController. I find it to be code smell according to MVVM.
How can this be done be better?