Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MVVM: Tutorial from start to finish?

Tags:

c#

.net

mvvm

wpf

I'm a C#/Windows Forms programmer with more than 5 years experience. I've been investigating WPF using the MVVM (Model-View-ViewModel) design pattern. I have searched the Internet for tutorials. I have even watched the entirety of Jason Dolinger's awesome video. Although I have found many, I have not found one that takes me from start to finish. What I really want is a tutorial that doesn't assume any previous WPF knowledge.

What are your favorite WPF-MVVM tutorials that helped you to learn?

like image 427
JP Richardson Avatar asked Sep 10 '09 14:09

JP Richardson


People also ask

How do I start MVVM project?

MVVM – First Application Step 1 − Create a new WPF Application project MVVMDemo. Step 2 − Add the three folders (Model, ViewModel, and Views) into your project. Step 4 − Add another StudentViewModel class into ViewModel folder and paste the following code.

Is MVVM worth learning?

In short: MVVM is not pointless, it's great. NET 4.0 WPF's control library is trash. Here is the simple proof of concept ViewModel which you can't data bind in pure MVVM manner using WPF.

What is MVVM Architecture in C#?

MVVM is an architectural pattern that is represented by three distinct components, the Model, View and ViewModel. In order to understand these three layers, it is necessary to briefly define each, followed by an explanation of how they work together. Model is the layer that drives the business logic.


2 Answers

Your question really seems to be asking 2 questions:

  1. Where are some good tutorials on WPF, assuming I have no previous WPF experience?
  2. Where are some good tutorials on learning MVVM?

Some of these resources may be duplicated in previous answers...

Tutorials on WPF

  • A Guided Tour of WPF by Josh Smith

    I wrote a series of introductory WPF articles on The Code Project. The goal of those articles is to bring someone with no WPF experience up-to-speed enough so that (s)he can fully understand how the series’ demo application works.

  • Bea Stollnitz (link is to her archives) has a number of great articles on WPF.

  • WPF: A Beginner's Guide - Part 1 of n by Sacha Barber

  • WindowsClient.net WPF Training Videos

MVVM Tutorials

  • WPF Apps With The Model-View-ViewModel Design Pattern by Josh Smith (duplicate link already provided by Yacoder)

  • Jason Dolinger's presentation on the Model-View-ViewModel (link to video embedded in article)

  • Dan Crevier's DataModel-View-ViewModel pattern series (similar to MVVM)

Composite WPF (Prism) Resources
Though not exactly what you asked, it is the natural progression with WPF and MVVM.

  • Codeplex: Composite WPF (Prism)

  • Silver Bay Labs has a number of great videos on learning Prism

  • Channel 9: 10 step-by-step videos on using Silverlight and Prism

  • Codeplex: Introduction to Composite WPF (CAL, Prism): Part 1 (of n)

like image 72
4 revs, 2 users 81% Avatar answered Nov 08 '22 08:11

4 revs, 2 users 81%


I was in exactly the same situation recently, mate, and I can tell you what I did.

Josh Smith "WPF Apps With The Model-View-ViewModel Design Pattern" read again, again and again :-) download the code, examine, compile and keep it around

MVVM foundation

  1. Examine the framework, use it in your app.
  2. Look at the Demo application in that framework.

No real start-to-finish tutorials, sorry...

like image 21
Max Galkin Avatar answered Nov 08 '22 07:11

Max Galkin