Should I use the Model-View-ViewModel (MVVM) pattern in Silverlight projects?
        Posted  
        
            by Jon Galloway
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Jon Galloway
        
        
        
        Published on 2008-12-17T17:17:30Z
        Indexed on 
            2010/04/25
            17:13 UTC
        
        
        Read the original article
        Hit count: 338
        
One challenge with Silverlight controls is that when properties are bound to code, they're no longer really editable in Blend. For example, if you've got a ListView that's populated from a data feed, there are no elements visible when you edit the control in Blend.
I've heard that the MVVM pattern, originated by the WPF development community, can also help with keeping Silverlight controls "blendable". I'm still wrapping my head around it, but here are some explanations:
- http://www.nikhilk.net/Silverlight-ViewModel-Pattern.aspx
 - http://mark-dot-net.blogspot.com/2008/11/model-view-view-model-mvvm-in.html
 - http://www.ryankeeter.com/silverlight/silverlight-mvvm-pt-1-hello-world-style/
 - http://jonas.follesoe.no/YouCardRevisitedImplementingTheViewModelPattern.aspx
 
One potential downside is that the pattern requires additional classes, although not necessarily more code (as shown by the second link above). Thoughts?
© Stack Overflow or respective owner