First project trying to use MVVM and Xamarin Forms, so please be gentle; however, I am at a lost on how to differentiate between the logic that belongs in the view model and model/service layer.
I am working on a simple app that shows a list, has a detail page for the list object when selected to change one field, and then return to the list. Once the user is satisfied, they navigate to another page that can confirm the transactions, and sends this to the on phone database and the connected web service.
Currently, I have 3 services: web service, database service, and itemcount service. I then have 3 view models, with their respective views: itemcountpage (this shows the whole list), itemcount detail page, and the itemcount confirmation page.
Where I am becoming lost is the interaction of the itemcount service, which holds all the logic for this process, i.e. getting my list from the db/web service, filtering the list, and then updating data in the database/web service; and then the view model, which runs all the commands for that view.
However, I think that this service should only expose the list, and that the viewmodel should be in charge of handling the item filtering and letting the service know which items need to be updated and should be shown in the next view, the itemcount confirmation view where all the changed items should be shown. I do not know where/when to use the observablecollection or notifypropertychanged essentially as this will be changing quite a lot.
I keep flipping back and forth on which layer this goes into, service or viewmodel, and would like a little direction. If there are also any great resources that you may have used to learning MVVM I would be eternally greatful.