Good Silverlight-MVVM Application Example

I read a number of good articles about the Model-View-ViewModel template, and my team intends to implement this template in the latest version of our application. I still don't quite get ALL the bits that go together to do this job. I would like to find a good example of this template with which I can work. Something on a small scale, just like Jason Dolinger does in his video here , but I would like me to be able to work on my own slower.

Thanks in advance for your help.

+48
silverlight mvvm
Jan 05 '09 at 15:28
source share
8 answers

Basically, a ViewModel is a wrapper around a model. Now this may not be very useful :-) Think of the model as the data that your application works with, say, a person. Now the person has a birthday, and you may want to get a form to enter the person’s birthday. Suppose we just use a simple TextBox, the date shows something like 02/01/2009 12:00:00 AM. For starters, we don’t need part of the time, and we also cannot be happy with part 02-02-2009, since it depends on your locale settings.

So, here the ViewModel comes im. It completes the Person class and displays the date as three integer values, year, month, and day. In a set of properties, he tries to build a date from different values ​​and displays any errors that may occur.

So he simply said that ViewModel is a model shell specially designed for a certain type (display). It eliminates most IValueConvertors at the same time.

Josh Smith has a nice explanation here: http://joshsmithonwpf.wordpress.com/2008/11/14/using-a-viewmodel-to-provide-meaningful-validation-error-messages and a great discussion here: http: // groups.google.com/group/wpf-disciples/browse_thread/thread/3fe270cd107f184f?pli=1

+28
Jan 6 '09 at 13:41
source share
— -

Prism 4.0 now includes documentation for creating MVVM applications. This is intended to use the Prism libraries, but the concepts work for the MVVM template as a whole.

http://compositewpf.codeplex.com/releases

+2
Jul 07 '10 at 15:40
source share

Here's another one to add to the list: Tony Sneed Simple MVVM Toolkit (yours truly): http://simplemvvmtoolkit.codeplex.com .

The toolkit consists of helper classes, Visual Studio element templates, and code snippets. In addition to the actual toolbox, there is an example application with step-by-step instructions on how to create a basic Silverlight application using the MVVM template.

+2
Jan 01 '10 at 14:26
source share

Nikhil Kothari posted a post on how to use this template in his Silverlight.FX library. Take a look here: http://www.nikhilk.net/ViewModel-Pattern-DLR.aspx

+1
Jan 12 '09 at 5:50
source share
+1
Apr 30 '10 at 20:35
source share

I recently went through many of them:

Dan Wachlin (LIDNUG):

http://www.lidnug.org/Archives.aspx

John Papa (PDC 2010):

http://player.microsoftpdc.com/Session/76864d75-b4da-4858-aac7-786c5f28e344

+1
Sep 22 2018-10-22T00:
source share

The best explanation of the ViewModel was given by Scott Hanselm during his MVC conversation in Europe.

The answer to one airliner is a model (class) created for the sole purpose of sending all the necessary data that is required by a particular type, as well as to receive modified data from a view in case of two.

+1
Apr 17 2018-11-18T00:
source share

Take a look at my article on real-life MVVM in Silverlight. Although this is not for beginners, it is mainly intended for expert developers working on realistic projects.

http://alexburtsev.wordpress.com/2011/03/05/mvvm-pattern-in-silverlight-and-wpf/

0
Mar 05 '11 at 18:51
source share



All Articles