Hanselminutes Podcast 241 - The MVVM Pattern with Laurent Bugnion
Scott talks to Laurent Bugnion about the often misunderstood Model-View-ViewModel (MVVM) pattern. What's the different between this pattern and MVC? Can I use this pattern for Silverlight, WPF and Windows Phone 7, and what Open Source projects can support this pattern?
Links from the Show
- IdentityMine
- MVVM Light
- Rob Eisenberg's "Caliburn" Framework
- Laurent Bugnion's Blog
- Get Started with MVVM Light
NOTE: If you want to download our complete archives as a feed - that's all 241 shows, subscribe to the Complete MP3 Feed here.
Also, please do take a moment and review the show on iTunes.
Download: MP3 Full Show
Do also remember the complete archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.
Telerik is our sponsor for this show.
Building quality software is never easy. It requires skills and imagination. We cannot promise to improve your skills, but when it comes to User Interface and developer tools, we can provide the building blocks to take your application a step closer to your imagination. Explore the leading UI suites for ASP.NET AJAX,MVC,Silverlight,Windows Forms and WPF. Enjoy developer tools like .NET Reporting, ORM, Automated Testing Tools, Agile Project Management Tools, and Content Management Solution. And now you can increase your productivity with JustCode, Telerik’s new productivity tool for code analysis and refactoring. Visit www.telerik.com.
As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)
Enjoy. Who knows what'll happen in the next show?
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
Another thing about Value Converters is that they are reusable where code inside a ViewModel is not. An example I use all the time is Boolean to Brush converter. I define TrueBrush and FalseBrush properties in my converter class and populate them in the XAML, so the colors can be different in each instance, but the action is the same. Now I can reuse that converter in many places and applications. If I had to code that in every ViewModel it wouldn't be very DRY. Plus, defining a Brush in code is no fun: this way you can use simple text in the XAML file.
Comments are closed.
A web version of MVVM would have the view model running in the browser, exposing javascript "commands"/functions, talking to the server via async calls and keeping the view (html/css) in sync as values change.
However, it seems as if ASP.NET MVC and friends encourage "fat" views that mix together visual presentation and presentation layer logic.