MVVM Bxf philosophy

MVVM Bxf philosophy

Old forum URL:

Ranjini posted on Thursday, June 03, 2010

Rocky –

General background: We are using CSLA4/ Silverlight4

I watched the MVVM video you posted on your blog. Thanks for that! It was very helpful. However, I am slightly confused now, having listened to it and also perused your ‘CslaMVVMSl’ project.  

You talk about the ‘Viewfactory’ and ‘Shell’ concepts in the video and I am assuming the framework you are using to support that is Bxf .  I looked at how it is being used in the sample project and it seems like the underlying assumption here is that the View:ViewModel relationship is  1:1 type. The “ShowView” functionality uses the xaml, viewmodel key, viewmodel instance as parameters. So, I am thinking that there can be only 1 viewmodel use in a view. Is this correct or am I way off?

In our project, there have been numerous instances where a single page/usercontrol has multiple viewmodel instances. Do you think that we need to separate these and decouple them so there is a 1:1 relationship?


Please advice.



RockfordLhotka replied on Thursday, June 03, 2010

For those who don't read my blog:

I typically have a view bind to one "root" viewmodel. But there may be other viewmodel objects for sub-areas of a view.

How that works depends on the view itself. If the "view" is really a set of different regions that are independent, I'll usually still have a "viewmodel" or "presenter" to which the view binds, with specific viewmodels for each different region.

But more common is the case where the view binds to a "root" viewmodel, and sub-areas or controls of the view bind to "child" viewmodel objects.

The demo parts of the video series will demonstrate those concepts and implementation.

Chris replied on Monday, June 07, 2010

Hi Rocky,

I posted an issue I am having with the current build of the CslaMVVMSl sample (from SVN) and it is in regards to your comment above:

 "But more common is the case where the view binds to a "root" viewmodel, and sub-areas or controls of the view bind to "child" viewmodel objects."

Please see the post which further explains an issue I am seeing with edit level.

Best regards,


RockfordLhotka replied on Tuesday, June 08, 2010

I have decided to put Bxf (Basic XAML Framework) online through CodePlex:

I'll probably remove the Bxf code from the samples where I've been using it, and instead have those samples use releases from the CodePlex site. I think this was a necessary step to avoid having many different versions of the code scattered all over the place.

And of course having this as a CodePlex project means it is relatively easy for other interested people to join into any development effort on Bxf itself.

Copyright (c) Marimer LLC