A fantastic video tutorial to help you wrap your head around MVVM with WPF

Discussion A fantastic video tutorial to help you wrap your head around MVVM with WPF

  • Monday, December 08, 2008 3:59 PM
     
     

    Hi All,

    Just wanted to let everyone know about a fantastic video on MVVM.  The presenter, Jason Dolinger, starts off showing you how to develop a simple "Stock Quote" program the wrong way (i.e. the Winforms way) and then refactors it to use the WVVM pattern.  It is quite long (1:30) but well paced.

    The video is available at: http://blog.lab49.com/archives/2650
    The source code is available at http://blog.lab49.com/archives/2689

    --Lenard

    • Edited by Lenardd Tuesday, December 09, 2008 3:19 AM Better subject line.
    • Edited by Lenardd Tuesday, December 09, 2008 3:21 AM spelling error
    • Changed Type Reed Copsey, JrMVP, Moderator Wednesday, October 13, 2010 9:20 PM No question - just informative
    •  

All Replies

  • Tuesday, December 09, 2008 10:05 AM
     
     

    I am watching it now.
    Very helpful!
    Many thanks.
    • Marked As Answer by Tao Liang Tuesday, December 09, 2008 10:06 AM
    •  
  • Monday, December 28, 2009 2:43 PM
     
     
    Thanks for posting this!  I watched it last week, and it was one of those "ah ha!" moments for me.  I had a difficult time bringing together a few concepts in my head, but this video helped me out immensely.
  • Monday, January 25, 2010 8:49 PM
     
     
    I'm watching it , it's great.
    Thanks.
    Beauty is a great God blessing
  • Friday, September 24, 2010 3:13 AM
     
     
    Agreed, Bolinger really does a great service with this one.
    Javaman
  • Wednesday, January 12, 2011 11:33 AM
     
     

    nice video !

    g8, thanks,


    Uddhav Garkal
  • Wednesday, January 12, 2011 11:54 AM
     
     
    Thanks for posting this Lenardd.

    …we each have more potential than we might ever presume to guess. (Blog: http://dsmyth.blogspot.com/)
  • Wednesday, January 12, 2011 12:55 PM
     
     

    Yes it's a great video.

    One of the three anyone interested in MVVM should watch.

    It's 2 years old though, as is the top post. 

  • Wednesday, January 12, 2011 1:46 PM
     
     

    Yes it's a great video.

    One of the three anyone interested in MVVM should watch.

    It's 2 years old though, as is the top post. 

    Hi Andy, what are the other two videos you mentioned?

    …we each have more potential than we might ever presume to guess. (Blog: http://dsmyth.blogspot.com/)
  • Wednesday, January 12, 2011 3:19 PM
     
     

    I think you're best watching something simple first.

    http://community.infragistics.com/pixel8/media/p/91949.aspx

    And yes, it's silverlight.  Still watch it even if you don't intend doing any silverlight.

    Then there's

    http://community.infragistics.com/pixel8/media/p/91950.aspx

    Which you should watch last.  It'll blow your mind.

    All of these have been around for a while.

    Resource wise there's also Josh's book and Apress have just recently published a paper book.

    Anyone new to working with MVVM will also eventually want to attach commands via a style.  Marlon Grech's ACB is the way I like to do this.

    I think digesting that lot'll keep you busy for quite a while!

  • Wednesday, January 12, 2011 4:28 PM
     
     
    Thanks very much Andy, really appreciate it.
    …we each have more potential than we might ever presume to guess. (Blog: http://dsmyth.blogspot.com/)
  • Thursday, January 13, 2011 9:54 AM
     
     

    Any time mate.

    The way I think about things is probably kind of obvious but might help if you're starting out.  Or if someone else's reading this.

    The view is the thing the user sees and allows him to interact with stuff.  It should be concerned with presentation and you want to minimise code behind but a load of xaml is fine.

    The Viewmodel adapts the data and actions to the view.  So all your doing-stuff code is used by it but is probably in separate classes.  You have one instance of a viewmodel per thing presented.  Say you have a screeen shows some guff about an order and a list of order lines.  You want an order viewmodel which exposes a collection of ordel line view model(s).  How you connect up commands to those order lines is one of the tricky bits - I expose a command out each of the order line viewmodels and use ACB to wire that up.   It's a very different way of working because there's no button click event code like most of us from a vb3-vb6 background expect.

    The model connects up your actual data.

     

    If it all sounds a bit tricky, it gets easier and you'll find that it's WAY easier than sticking with your old click events style once you get into serious coding.

  • Thursday, July 19, 2012 6:01 PM
     
     
    Beautiful! Thank you for posting =)

    May the Force be with you young Jedi...

    Console.WriteLine("-Warren");

    Please Help your Helper(s) =)
    If you find someone's post helpful please click the green "up arrow" to the left and vote!
    Did someone's post Answer your question? Mark it as the Answer!
    It's Really Appreciated =)


    • Edited by DarthBerg82 Thursday, July 19, 2012 6:03 PM
    •