Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Difference is quite simple.</p> <p>Model holds business logic.<br> View model contains presentation logic and is additionally shaped to fit views.</p> <p>In Your case - view model implements <code>INotifyPropertyChanged</code>. That's pure presentation logic.</p> <p>Model is not responsible for notifying one particular UI that something has changed, it's responsible for transferring invoices, calculating wages etc.</p> <p>Sometimes (when model is simple) this abstraction is not necessary though.</p> <hr> <p>Some <a href="http://en.wikipedia.org/wiki/Model_View_ViewModel" rel="noreferrer">wiki</a> quotes:</p> <p><strong>Model</strong>: as in the classic MVC pattern, the model refers to either<br> (a) an object model that represents the real state content (an object-oriented approach), or<br> (b) the data access layer that represents that content (a data-centric approach).</p> <p><strong>ViewModel</strong>: the ViewModel is a “Model of the View” meaning it is an <strong>abstraction of the View</strong> that also serves in data binding between the View and the Model. It could be seen as a specialized aspect of what would be a Controller (in the MVC pattern) that acts as a data binder/converter that changes Model information into View information and passes commands from the View into the Model. The ViewModel exposes public properties, commands, and abstractions. The ViewModel has been <strong>likened to a conceptual state of the data as opposed to the real state of the data in the Model</strong>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload