ViewModel

There are 5 entries for the tag ViewModel
Making ViewModel Easier

Glenn Block and I have been working together on the ViewModel pattern.  We’ve been trying to identify the biggest pain points associated with the pattern, with the goal of adding framework support to alleviate the pain.  Tonight, Glenn posted, “View Model” – the movie, cast your vote. I decided to use our new friend StackOverflow.com to gather some feedback.  So here it is: What are the biggest pain points with the ViewModel pattern? Please participate in this StackOverflow.com poll for how the framework can better support the ViewModel pattern! Technorati Tags: ViewModel,Model-View-ViewModel,MVVM

posted @ Tuesday, May 5, 2009 2:07 AM | Feedback (0)

Silverlight Airlines with a ViewModel

Not long after I joined Microsoft, I was looking at the Silverlight Airlines code sample.  I was new to Silverlight, so I used this demo as a way to help learn Silverlight.  The demo app is pretty cool, and ScottGu showed it off at Mix, so I had seen it before.  I took on an exercise to attempt to add some features to the application, and this helped me learn more about Silverlight. To select a flight, you drag your mouse from one city to another, and then drag over the date range for your travel. ...

posted @ Friday, November 14, 2008 2:22 PM | Feedback (5)

Binding Converters - VisibilityConverter

One of the reasons why the ViewModel pattern is so powerful in Silverlight and WPF is because Binding Converters can do so much.  As we saw in HelloWorld.ViewModel, a ViewModel can expose a boolean property that is consumed as a Visibility value for controls.  This requires some glue to convert the boolean to the necessary enum, and that’s where our VisibilityConverter comes in.  If you want to see this in action, go check out the sample code, but here’s how the VisibilityConverter works. In order to create any binding converter, you can start off by creating a class that...

posted @ Monday, October 27, 2008 9:58 PM | Feedback (1)

HelloWorld.ViewModel

A few folks asked me to provide a ViewModel sample of some sort.  I thought this was a great idea, since I don’t know that I had seen a straight-forward ViewModel sample yet.  So here it is: HelloWorld.ViewModel!   Click the image to view the Silverlight sample live. Let’s start out by looking at the code for the ViewModel class, since that’s the file that I authored first. 1: using System; 2: using System.ComponentModel; ...

posted @ Monday, October 27, 2008 11:08 AM | Feedback (14)

ViewModel Pattern

When I was at BIG, I created what I called the Extended MVP pattern.  I built a framework that was used on multiple projects for managing the presentation layer as well as validation.  I’m still very happy with what I created, and my teams at BIG are still pleased with those applications as well.  In fact, I just learned that they were looking into using the pattern within a Silverlight project they’re doing a proof of concept for.  I mentioned the ViewModel pattern to them, suggesting they use it instead of using the MVP approach.  When asked for more information,...

posted @ Tuesday, October 21, 2008 4:31 PM | Feedback (5)