O'Reilly logo

Microsoft Visual Studio 2015 Unleashed, Third Edition by Mike Snell, Lars Powers

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the Data Model and View Model

As discussed, we are going to pursue an MVVM approach to this application. Recall that this means a separation of concern between the objects that hold our data (the Model), the objects that display our data (the View), and the objects that glue the display and the data together (the ViewModel).

Because our model simply needs to store a few properties that represent the meal data we want to track, this is something safe and simple to add into the Shared project. Likewise, the ViewModel won’t implement any platform-specific logic, so it can live in the Shared project as well. To stay organized, we’ll create two new folders in the Shared project: DataModel and ViewModel. With the folders created, right-click ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required