views:

1872

answers:

7

I'm looking for code of full applications that (1) use the MVVM pattern and (2) are approachable for WPF/Silverlight/MVVM beginners. So far I have only found:

  • Crack.NET - A runtime debugging and scripting tool (useful but quite complicated)
  • CipherText - WPF Password Manager (perfect but written in VB.NET)

What are some others?

preferably smaller helper apps or tools that use MVVM but that have a completed feel, perhaps with WPF/Silverlight graphic/animation goodness, etc. which show not only the MVVM concepts being used but in a context of a real-world, completed application

My Contribution

Thanks for all the tips, I collected together a list of 15+ MVVM code examples and posted the here:

Overview of WPF/Silverlight code examples that help you learn MVVM.

+1  A: 

Try this one. Also, Family.Show may be useful.

HTH, Kent

Kent Boogaart
Family.Show was started when WPF was still Avalon and we didn't use the MVVM pattern.
Alan Le
+3  A: 

I too class myself as a beginner in MVVM developing a large scale application for about a month now. I'm over most of the main hurdles, but keep getting confused up by a few things.

Be careful with the suggestions from Kent. They'll get you started, but the subtle differences in Silverlight and WPF will trip you up occasionally (triggers are one).

I don't know of any full sites, but I started with the Composite Application Guidance and PRISM libraries. These a little too cumbersome for a 'beginner' and just MVVM, but some of the concepts are very useful (event aggregator for example).

I suggest that you read blogs by Josh Twist, Josh Smith, Shaun Wildermuth and Nikhil Kothari. These guys are very knowledgeable. They are also very open to answering questions too.

What is your development background? Some of the concepts surrounding method calls, responses and delegation are a real break from "traditional sequential" coding techniques.

HTH, Mark

Mark Cooper
thanks for the name tips, my background is mainly stateless web programming, never did e.g. C++ or winforms, so the whole stateful/delegate/event model + .NET 3.5 + XAML/Binding/Commands/Routing/triggers/etc + MVP/MVVM patterns are new concepts, determined to plow through them though, real apps help
Edward Tanguay
I came from ASP.NET back ground too and found the Asynchrounous progeramming model the hardest to grasp. Having to raise and subscribe to events seemed like oodles of extra code at the start, but after a month or two it make perfect sense, and helps isolate components nicely. Updates are now simple.
Mark Cooper
+2  A: 

I've been using MVVM for the last couple of months on a project and it's been fantastic. I've been doing UI work for over 12 years and it's the best thing I've come across.

Martin Randall
I agree. MVVM is a smart pattern indeed, and make updates to code so easy.
Mark Cooper
Edward Tanguay
You probably would not see the benefits in doing an hour long example for MVVM. Of course you could knock together a quick demonstration quicker - but that is not what this pattern is about. The benefits kick in when using on larger projects, where the UI is seperate from the business logic.
Martin Randall
+1  A: 

The WPF Disciples group has decided to create a real-world MVVM + Mediator reference application similar to the Pet Shop refence application for Web Apps. Your can follow the development on codeplex here

Asif
+1  A: 

Given the question, you may be interested in the current effort going on to create a "Pet Shop" type reference implementation for M-V-VM. You can join the conversation or follow progress here.

wekempf
+1  A: 

I have been using MVVM for about 2 years now, and I can say that it is a resounding success. I have shipped one large-scale medical imaging solution using MVVM in Silverlight. I am also about to ship a complicated WPF application using Prism and MVVM extensively. In fact, I don't know how I'd achieve some of my problems elegantly without MVVM in this more recent application.

+1 on MVVM. It works. It is testable. It is extensible. It facilitates developer-designer workflows. It ALSO doesn't have to be messy and plumbing-heavy.

In addition, I created a medium-sized Silverlight application using MVVM for the CodeMash conference in January. You can see it and get the source code here.

Brian Genisio
A: 

Speaking about real-world apps, Silverlight's own feature-sets are still far from what business developers require. None of frameworks seem to have the solutions for a true real-world business apps yet.

From my experiences, a real-world business app should have at least the following:

  • Consistent and solid navigation interface.
  • Multi-level/child navigation with browser's integrated journal. I.e, access a specific customer by /Customers/{ID} without replacing parent content.
  • Page-level security and authentication. I.e, Only Products Manager can access "/Products"
  • Login redirection. I.e., if users aren't signed-in yet, access to a restricted page should redirect users to a login page. (This should be consistent with the whole navigation framework in-terms of back/forward capability, etc).

Now, if we go back to what Silverlight offer currently, none of the above scenarios can be easily implemented.

If this could be of any help, we've just released an advanced Silverlight toolset that puts together all the features mentioned above, plus developer's most wanted features: WPF-style routed command, routed events, delegate command, MVVM pattern, and many more.

Check out http://tinyurl.com/23qkpp7, try our real-world business application sample built entirely using MVVM pattern. Hope this helps.

James
While I agree that 1 and 2 aren't really there even now, I distinctly remember using 3 and 4 (both page-level and even more involved authentication with declarative attributes AND login redirection in both unauthenticated and unauthorized contexts) a long time ago, starting with Silverlight 3 and (I think) the Navigation Sample. It's possible we coded _some_ of the functionality but there was a lot there to start with. This was more than a year ago so you'll forgive me if my memory has failed me to such as an extent as to be completely wrong :)
Alex Paven