Fri Aug 18 00:18:14 EDT 2017
Running into a case where a viewmodel is needed. There are 3 view
- display pane that switches between different pages
- selection box to select the page
- +/- buttons (take this as single view)
This is a nice example because there are 3 different kinds of views:
display only, update only, update+display.
The ViewModel will then be responsible of the state,
- upon reception of event will update pane and selection box
- can receive event from selection box or +/- buttons
So "view" means here more generally a GUI object which receives
modelview updates and/or sends events to modelview.
From a dataflow point of view, the purpose of the viewmodel is to
convert from networked views to star view-viewmodel, and so it is a
complexity reduction (N^2 -> N+1).