MVVM and Prism Demo for PDC09 Silverlight Session | John Papa

John Papa

Evangelist on the loose

MVVM and Prism Demo for PDC09 Silverlight Session

...

Earlier today I blogged about my session yesterday on Advanced Large Scale Applications with Silverlight at PDC 09. I had a great time at PDC but now that I am home and have a faster and more stable internet connection, I zipped my demo code for the Silverlight 3, Prism, MVVM sample so you can now download it from here. Feel free to take the code and use it as you will.

The majority of reusable code for the Screen Conductor pattern is in the Infrastructure project since it is generic. The code demonstrates:

  • MVVM using the marriage of the View to the ViewModel
  • The Screen Conductor pattern/technique for view navigation
  • Prism
  • Unity

You should use the Northwind database and edit the server side web.config file to point to your local copy.

I recently wrote an article for the PnP team on this topic that goes through all of the code. Once it is available online I will post its location.

And if you attended my session at PDC, thank you so much for coming! If you did not get a chance to see it, you can watch it using the recorded video of my session and see my slides here.

 

UPDATE: You can now download the source code for the Silverlight 4 MVVM demo that I showed in this presentation. The sample is a VERY basic MVVM app that demonstrates how to do a simple form of MVVM that can be replicated in a larger project. Thanks for your patience!

tags: Silverlight
  • Anonymous

    Hi John, thank you for your sharing. I have downloaded you solution just now, but when I build the solution, I found missing the reference named Expression.Samples.Interactivity. I do not know where I can get it? Any suggestion?

  • Anonymous

    Hi John.
    What about Prism and Silverlight 4?
    Two days ago I’ve decided to adopt Prism for our new web app.. but with SL4 what will change?
    Thanks!

  • Anonymous

    Hi John, do you have some sample using mvvm with ado.net data services?,
    Regards.

  • Anonymous

    There is no Video for your session that I can detect

  • Anonymous

    Thanks, John.

  • http://www.silverlighthack.com Anonymous

    @John,
    Note: I have not seen your PDC talk, so I am not sure if you addressed any of this stuff already.
    Correct me if I am wrong…
    I have talked to some Microsoft guys and did some research and I keep on hearing that MEF is going to be the "loose composition/modularity" framework of the future. Furthermore, I heard in a podcast (from the MEF manager) that the plan is to eventually run Prism "under the MEF infrastructure".
    This is why we put off using Prism, as I heard from another MS employee (heresay) that there are some big changes planned for Q1 2010 and that is when the whole MVVM/loose composition/modularity picture will become much clearly defined.
    For example…from Mike Tauly’s blog MEF " it’s also part of Silverlight 4": mtaulty.com/…/silverlight-4-r
    I think this is one of those things that warrants proper direction, especially for really large Silverlight applications. For example, we are putting one into production that is 110k+ lines of C#/XAML/service code.

  • Anonymous

    @John
    I have an installed copy of Blend 3 and I cannot find the interactivity dlls to make this project work. Could you please let me know in which windows directory I should be able to find them?

  • http://geekswithblogs.net/WynApseTechnicalMusings/archive/2009/11/22/136472.aspx Anonymous

    In this Issue: Chris Klug , Gavin Wignall , Jeff Handley , Brad Abrams ( 2 ), Mike Flasko , Karl Shifflett

  • http://www.microapplications.com Anonymous

    Hey, John. Sounds like you’re having a blast in your new role. The issue with Expression.Samples.Interactivity goes beyond the Expression 3 DLLs, which I have access to as Studio 3 owner. The Expression.Samples project is also required and is located here: http://expressionblend.codeplex.com/. Once you get that installed (it references the Expression Blend 3 DLLs), and your DB connected properly, everything builds fine, and you can explore the solution. Hope this helps.

  • Anonymous

    As for missing expression.samples.interactivity one needs to download and install expressionblend.codeplex.com/…/ProjectReleases

  • Anonymous

    About my comment on #2… watched your PDC09 talk.

  • Anonymous

    John, loved your talk…very good stuff.
    I was wondering if you’re going to post the silverlight 4 project in addition to the silverlight3 + Prism one that you already posted.

  • Anonymous

    John,
    Finally got to viewing your PDC presentation. Great presentation, thanks!
    You have the code available for the Silverlight 3/VS 2008/Prisim demo available, but I don’t see the Silverlight 4/VS2010. I would love to see this code if you have it available.
    Thanks again for a great presentation!

  • Anonymous

    Yeah! Love to see your sample in Silverlight 4, VS2010, and WCF RIA Services. Can’t wait….
    By the way, Great presentation!

  • http://www.syncer.fr Anonymous

    Hi John
    I’m really interested by your investigations,
    Do you have something around :
    Prism + RIA (or WCF RIA) + SL4 & VS2010
    Thanks in advancei
    Christophe

  • http://johnpapa.net JohnPapa

    Thanks everyone. Addressing a few points:
    1) You need to install the Blend Samples, found here: expressionblend.codeplex.com/…/ProjectReleases
    2) I do not have a RIA Services, Prism, MVVM, Silverlight sample at this time. I’m hoping I can get approval to put one together … no small feat toi make a good one :-)
    3) Ah, yes … I forgot to put the Silverlight 4 MVVM sample up. I will do that before Monday. Sorry!

  • Anonymous

    John, I tried to convert this to .net 4 SL 4 but have problems because of the DevExpress.AgMenu control not loading for SL 4. Do you know of a update or replacement

  • http://weblogs.asp.net/tolgakoseoglu Anonymous

    Hi John:
    Great PDC talk. Could you post the code for the first "simple" MVVM project you showed? The Prism solution is quite complex and I would just like to understand how you do MVVM and separate the different responsibilities out. I am trying to follow your presentation and code it myself as you talk, but I don’t think you showed all the code there was.
    Thanks
    –tolga

  • Anonymous

    Hi John,
    Scenario: i have an outlook style left navigation bar (some views have to be loaded here), it is loaded into a region. I have a top region ( Search) and a right content region ( views are loaded here as a result of navigation actions).
    Ive gone through your implementation and i haven’t found a way to fit the screen conductor pattern into my scenario since it allows me to work with only one triad of MVVM (screen) at a time. Please correct me if i am wrong , Do i have to write my own Screen Conductor that can work with multiple regions and Screens???
    Regards,
    Ahmed

  • http://johnpapa.net JohnPapa

    I just posted an update to this post so you can download the SL 4 MVVM demo that I showed in the presentation. Sorry for the delay!

  • Anonymous

    Thank you very much for great presentation. It was vary educational for me. Two things I would like to ask:
    1. I have Blend 3 installed but there is no Expression.Samples.Interactivity.dll in it. I wonder if you could include it in a package.
    2. I am new in Prism/WPF/Silverlight in general, but like the concept. I only wish if Prism had some kind of state machine integration. So instead of working directly with views/models I would prefer to work with states, which in its turn instantiate related views. Also it would be great if Prims had some User Role based view managment. I wonder if you could point at some solutions regarding these items.
    Regards,
    Konstantin

  • Anonymous

    John,
    I am sorry I was not paying attention to earlier posting where you pointed out where to get Expression.Samples.Interactivity.dll. So it has been solved.
    Thanks
    Konstantin

%d bloggers like this: