I know that many developers are waiting of me to post the MVVM code. I have spent the last three weekends tracing memory leaks that I thought were in my libraries. I just didn’t want to post code that I knew had a memory leak. I finally tracked the problem down today to a control. For now, I have removed that control from my projects. I will do a blog post on the control as soon as the control vendor has validated my findings from today.
I will post the WPF LOB MVVM code and article on Monday, 8 December 2008. The MVVM applications are all ready, I just need to write the article and make a few videos. The main application I’ll post tomorrow has the Unit Tests to run the application without the UI.
This three weekends of lost time has set my delivery of Ocean back too. I hope to post Ocean by the 18th or 19th of December. The documentation will take the most time.
Here are some things happening in the MVVM spaces for WPF LOB developers that I know about:
- Jaime Rodriguez, possibly Josh Smith, possibly Beth Massi and myself will be doing an all day teaching event on WPF LOB MVVM in Los Altos near the end of January 2009. As soon as registration opens I’ll post a message here.
- Adam Kinney and I will be recording another Channel 9 video over the next 10 days covering WPF LOB MVVM.
- I know of another MVVM video being recorded by an MVVM Rock Star next week. Details to follow.
- Josh Smith and I are getting together in New York City this weekend and will post some MVVM coolness next weekend.
- The WPF Disciples had a long and interesting thread on MVVM that you can read here: WPF Disciples Thread.
Hope you have a great day!
Just a grain of sand on the worlds beaches.




December 8, 2008 at 4:09 am |
Nice that u tracked the bug down. what a nasty one.
Is your implementation of MVVM going to work with Silverlight? hope so
December 8, 2008 at 10:11 am |
This series will focus on WPF. There are differences between the two. In Jan 2009, I’ll post a version for Silverlight. ICommands is one area I know I’ll have to look deep into. Others have already started posting solutions.
Cheers,
Karl
December 9, 2008 at 12:27 am |
Hi Karl,
Looking forward to it!
I created my first MVVM project this weekend, and there are two burning things I’m interested in understanding better – having one more example from you is bound to help! Would be interested to hear your thoughts on either.
1) Who’s in charge?! P&P’s RI StockTrader seems “ViewModel-First” (ViewModel/PresentationModel stores reference to the View and even generates the view in the default constructor) , whereas Josh Smith’s CodeProject MVVM article seems a top-down “View-First” with just about the opposite (ViewModel is agnostic of the View). To me, the “View-First” a) seems more intuitive to understand as a beginner and b) works much better with design-time support (at least with the current tooling). Another way to couple the Views and ViewModels on seemingly more equal footing (most agnostic) seems to involve use of a DataTemplate with the ViewModel as its DataType and the View as its Content property. DataType isn’t supported (yet) in Silverlight though. Josh Smith uses this pattern in Crack.NET, and Julian Dominguez writes about the technique here: http://blogs.southworks.net/jdominguez/2008/05/first-approach-to-presentation-model-with-datatemplates/
2) Related to the patterns above, what is the best way to create a hierarchical MVVM that’s scalable, ie how to create an ancestry of Views and ViewModels that are all wired up. Who does the wiring? What are the relationships? In my implementation, Views create their own ViewModel in their default constructor. ViewModels then have a SetChildren() method that’s called in the parent View’s constructor.
Sorry for the brain dump – trying to grok all of this.
David Cuccia
FYI, Re: commanding – Jeremiah Morrill has posted an MVVM implementation for a Silverlight RSS reader using the Command class in the Codeplex SLExtensions library: http://jmorrill.hjtcentral.com/Home/tabid/428/EntryId/339/Silverlight-MVVM-Example.aspx
December 10, 2008 at 5:51 am |
Karl -
I too have been diving deep into MVVM and have been following all the discussions from you and the disciples which have been awesome. I’ve been trying to figure out how to define the command bindings in the view model, and get them to work properly in the view. If you could take a look and let me know what you think of this approach I came up with I would appreciate it: http://codingcontext.wordpress.com/2008/12/10/commandbindings-in-mvvm/
December 11, 2008 at 3:30 am |
Hey Karl, what happened?? Can’t wait to get hold of the good stuff…..
/J
December 11, 2008 at 3:31 am |
J,
Working on the first post now. Stand-by.
Cheers,
Karl
December 15, 2008 at 10:21 am |
Micah,
Nice to speak on the phone with you. Glad we got the use of the ICommand and RelayCommand sorted out,
Cheers,
Karl
December 16, 2008 at 5:39 pm |
[...] Toolkit DatePicker Memory Leak Problem Back on 8 December 2008 I had blogged about memory leaks and that I narrowed the leak down to a [...]