Bryant Likes's Blog

It's all about WebData

Recent Posts

Tags

News


  • Windows Live Alerts
    View Bryant Likes's profile on LinkedIn

    Me

    The posts on this weblog are provided "as is" with no warranties and confer no rights. The opinions expressed herin are the personal opinions of the individual authors and do not represent the views of Avanade in any way.

Community

Email Notifications

Archives

WPF Patterns

If you're doing WPF development, you really need to check out Dan Crevier's series on DataModel-View-ViewModel. Right now there is no easy way to read through all his posts on the subject without navigating through them using the calendar control on his blog. So for my own reference (and for yours as well) here is the list of links in the series:

  1. DataModel-View-ViewModel pattern: 1
  2. DataModel-View-ViewModel pattern: 2
  3. DM-V-VM part 3: A sample DataModel
  4. DM-V-VM part 4: Unit testing the DataModel
  5. DM-V-VM part 5: Commands
  6. DM-V-VM part 6: Revisiting the data model
  7. DM-M-VM part 7: Encapsulating commands*
  8. DM-M-VM part 8: View Models*

In addition to Dan's work, John Gossman's work on the Model-View-ViewModel pattern which is pretty similar and is also important when it comes to understanding how to design a WPF application. He has several posts on this pattern which I've collected below:

I think they are both saying pretty much the same thing. From my limited experience with designing WPF application I'd say what they are saying is correct. You really do need the kind of seperation they are talking about to make your WPF app work well. If you hard-code the click event in the XAML code-behind, how do you extend that to the context menu, the short-cut key, etc. without making things tightly coupled?

I'm currently working on updating my Contacts Sample to be more in line with DM-V-VM and I'll be adding a few more posts to the series as soon as I get it working. In the meantime, if you want to get a good education in WPF patterns that work, read through the links above.

* I'm pretty sure the title has a typo, these are still talking about DM-V-VM.

Technorati Tags: WPF

Posted: Sep 27 2006, 01:30 PM by bryantlikes | with 8 comment(s)
Filed under:

Comments

Fanzoo's Blog of Knowledge said:

# April 20, 2007 8:45 AM

Rama said:

The Patterns are fantastic. Thanks a lot for this. I am facing difficulty in hiding showing controls when event happens.

As a scenario, if I have a Window with three text boxes, then on click of a button, I want to hide two text boxes. I will I handle this in the MyCommand class?

Any help will be greatly appreciated. In a fix right now :0)

# September 10, 2007 7:40 AM

Craig Shoemaker said:

Listen to the show here! John Gossman , Microsoft Architect for WPF and Silverlight, discusses his experiences

# May 22, 2008 10:00 AM

Clingingboy said:

还是wpf文件推荐:)

# July 1, 2008 8:57 AM

Model-View-ViewModel … « Carli??os Blog said:

Pingback from  Model-View-ViewModel … « Carli??os Blog

# July 3, 2008 9:07 AM

Composite WPF Patterns | Panes of Glass said:

Pingback from  Composite WPF Patterns | Panes of Glass

# July 19, 2008 1:35 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)