You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.
I've been playing around with MVVM and RAC for a little while now and have been updating an old project to MVVM (RAC will come later). I want to make sure I'm understanding how all the pieces fit together. Does anybody have any feedback on that pull?
Thanks in advance.
The text was updated successfully, but these errors were encountered:
Sorry, but most collaborators' time is pretty limited, so I don't know that anyone will have a chance to read the whole pull request. Do you have a specific question that you'd like an answer to?
One question that came up as I was going through it was WRT table view handling in the view model.
In Ash’s sample app, he has methods that very closely mirror those of the table view data source. To me it feels like the view model knows too much about the view at that point, so I followed your GroceryList code instead where the view model just exposes the array of items and it’s up to the view layer to map it into the table.
Should the view model be totally agnostic to the view?
I do think the view model should be agnostic toward the particular view that it's used with.
However, if a tree structure exists (for example, grocery items by list), it would make sense to expose that on the view model—and that could lead to a very natural mapping of sections/rows in a table view. I would try to preserve the fidelity of the model as much as possible, though, which probably means using some sort of collection type.
Does that help at all?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I've been playing around with MVVM and RAC for a little while now and have been updating an old project to MVVM (RAC will come later). I want to make sure I'm understanding how all the pieces fit together. Does anybody have any feedback on that pull?
Thanks in advance.
The text was updated successfully, but these errors were encountered: