As my company migrates towards the .NET framework from VB6, it looks like we are going in the direction of WPF (my boss is in love with the Office-style Ribbon control). I’ve been working to mock one of our VB6 applications in WPF and decided to experiment with MVVM at the same time. I’m being discouraged from using an existing MVVM framework, so I guess I need to write my own. The biggest concern right now seems to be a method for registering and managing all my views from a central spot – a manager class – but I’m not exactly sure how to implement this. I see article on IoC and ServiceLocator but have a are time putting those ideas to use.
Does anyone have suggestions on the features and patterns that I should be implementing to make a very lightweight, but serviceable MVVM framework? Aside from an existing framework, what existing code resources would you use to help progress this a project like this?
I highly suggest that you watch the “Build your own MVVM Framework” presentation by Rob Eisenberg the creator of the Caliburn framework. He takes you through the main aspects needed for the foundation of your MVVM Framework. Also IMHO Caliburn is one of the best 100+ “MVVMish” frameworks out there. It has a lot of fresh ideas and nice implementation details. There is also the Calibrun Micro framework which is a stripped down more lightweight version of the full framework and is a good stop for studying how things could be done.
I would also suggest, that you don’t go too tunnelvisioned on MVVM. Even in WPF there are common scenarios that are better handled using other patterns like MVC, MVP. Infact Caliburn uses all of these patterns. So actually, it really doesn’t do it justice calling it a MVVM framework.