Tales from the Smart Client

John Gossman's observations on Avalon development

Model-View-ViewModel

In preparing my example of Model-View-ViewModel I had a lot of help from Adrian Sanchez, who previewed the code and asked me questions about it.  It was a big help in figuring out what needed explanation.  When I started on Expression I heard about the pattern, and for a long time it was confusing, then suddenly one day it was obvious.  The good news is after going through the example, Adrian said he understood the feeling:  he now has to explain it to his colleagues.

Adrian also made an important observation:  WPF uses the Model-View-ViewModel pattern.  WPF controls are designed to be "look independent"...a Button is simply something that can be clicked and has focus etc., the Button class says nothing about whether the object is rectangular or round, or even has 3D components...that is determined by its Style and Template.  Java Swing is similar:  what they call a ButtonModel, WPF calls a Button and I would classify as a ButtonViewModel!

Published Sunday, February 26, 2006 7:25 PM by JohnGossman

Comments

 

Bryant Likes's Blog : WPF Patterns said:

PingBack from http://blogs.sqlxml.org/bryantlikes/archive/2006/09/27/WPF-Patterns.aspx
September 27, 2006 4:32 PM
 

Robert Folkesson said:

Jag talar ofta med kunder och partners som vill använda vedertagna designmönster för att separera ansvaret

January 13, 2009 9:14 AM
 

Tales from the Smart Client Model View ViewModel | porch swing said:

June 14, 2009 4:17 AM
New Comments to this post are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker