Dan Crevier's Blog

In search of a better name...

Browse by Tags

Tagged Content List
  • Blog Post: DataModel-View-ViewModel pattern series

    I thought I should add a post with the full list of posts in the D-V-VM pattern. They are: DataModel-View-ViewModel pattern: 1 (overview) DataModel-View-ViewModel pattern: 2 (first implementation of DataModel class) DM-V-VM part 3: A sample DataModel DM-V-VM part 4: Unit testing the DataModel DM-V-VM...
  • Blog Post: DM-V-VM part 8: View Models

    Ok, time to wrap this up :-) Now, we'll finally build what I'm calling a view model for managing a portfolio of stocks (building on the StockModel example from previous posts). A view model is a class that will be used as the DataContext for a data template that will be used to provide the UI for...
  • Blog Post: DM-V-VM part 7: Encapsulating commands

    In part 5 , I talked about commands and how they are used for behavior. Now, I want to talk about a better way to encapsulate them. First, I'll create a CommandModel class that encapsulates the RoutedCommand and the enabled/execute code. This is all pretty straightforward: public abstract class...
  • Blog Post: DM-V-VM part 6: Revisiting the data model

    Sorry it's taking me so long to get the posts out. The series turned out to be a little longer than I anticipated :-) I got a lot of good feedback on the Data Model stuff. First off, I want to mention layering. The DataModel typically is a layer on top of some other lower level data model that's not...
  • Blog Post: DM-V-VM part 5: Commands

    In the previous posts, I've covered data models and how to make data easily consumable by Avalon. Now, I want to start getting into the view model side of things because I don't think it's clear what I mean by them and I'm working up to an example. I want to start by talking about handling behavior in...
  • Blog Post: DM-V-VM part 4: Unit testing the DataModel

    In part 3 , I showed code for StockModel, a DataModel for stocks. On the Max team, we are big believers in extensive unit testing of our code. It took some time to learn the best way to test some of the WPF related stuff. In this post, I intend to demonstrate how to unit test code that involves a Dispatcher...
  • Blog Post: DM-V-VM part 3: A sample DataModel

    In part 2 , I showed a base class for DataModels. In this post, I will describe a sample implementation. For this sample, I'll use a DataModel that represents a stock. The model will be in charge of asynchronously fetching the stock quote and making it's value available. As part of making this class...
  • Blog Post: DataModel-View-ViewModel pattern: 2

    In part 1 , I gave an overview of a pattern we use in the UI development of Max . In this post, I plan to talk about DataModels. In part 1, I wrote: DataModel DataModel is responsible for exposing data in a way that is easily consumable by WPF. All of its public APIs must be called on the UI thread only...
  • Blog Post: DataModel-View-ViewModel pattern: 1

    John Gossman has blogged several times about the M-V-VM pattern for developing WPF applications. We've been using a similar pattern on the Max team, with slightly different terminology (DataModel instead of ViewModel). I thought I'd do a series of posts about some of our learnings here. With this pattern...
Page 1 of 1 (9 items)