Click here to Skip to main content
15,897,891 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: MVVM Question Pin
_Maxxx_14-Feb-11 23:19
professional_Maxxx_14-Feb-11 23:19 
GeneralRe: MVVM Question Pin
Pete O'Hanlon14-Feb-11 22:19
mvePete O'Hanlon14-Feb-11 22:19 
AnswerRe: MVVM Question Pin
Abhinav S14-Feb-11 18:21
Abhinav S14-Feb-11 18:21 
GeneralRe: MVVM Question Pin
_Maxxx_14-Feb-11 18:55
professional_Maxxx_14-Feb-11 18:55 
GeneralRe: MVVM Question [modified] Pin
SledgeHammer0115-Feb-11 7:31
SledgeHammer0115-Feb-11 7:31 
AnswerRe: MVVM Question Pin
BubingaMan22-Feb-11 0:05
BubingaMan22-Feb-11 0:05 
GeneralRe: MVVM Question Pin
_Maxxx_22-Feb-11 13:41
professional_Maxxx_22-Feb-11 13:41 
GeneralRe: MVVM Question Pin
BubingaMan22-Feb-11 22:04
BubingaMan22-Feb-11 22:04 
_Maxxx_ wrote:
? Au contraire, surely? The single thing the Vm doesn't do is to describe what the view looks like!


Sure it does. The data that is shown is (in my interpretation) is part of what the view looks like.
How many times did you bind a control's visibility property to a bool for example?


_Maxxx_ wrote:
Assuming your View is databound to your ViewModel, then your ViewModel needs to get its data from somewhere - and do something with it if it is updated??


That's what a controller is for.


_Maxxx_ wrote:
a 1-1 relationship with a VM - and deals with the event


Not necessarily 1-1, but yes.

_Maxxx_ wrote:
So you have a three-way collaboration? VMn, Vn and Cn with a Singleton as the One Ring to Bind Them All?


Something like that, yeah. It's just MVC with the MV being MVVM Smile | :)

It's very easy to write tests as well. Like I said previously, we see the model object as being descriptive of the GUI. It's a state. The controller is the behavior. We write controller tests to test the behavior and additionally, we assert the state of the models. So we can actually test our GUI to an extent. To me, the model object is an integral part of the GUI.


_Maxxx_ wrote:
I also tend toward a single, singleton Controller which, I think, takes the place of your Singleton event handler and many Controllers


Doesn't that result in a giant class? Also, it's not always 1-1. Lots of times, 1 controller will have multiple models (each model binding to a part of the screen).

Where do you do your business calls then? In the one controller or does the model itself do that?

I should also add that I have a base class for controllers wich has quite some standard functionality. Like threading for business calls while it automatically activates busy indicators on the relevant presentations etc.
For line of business apps, this works quite well.
GeneralRe: MVVM Question Pin
_Maxxx_23-Feb-11 12:47
professional_Maxxx_23-Feb-11 12:47 
QuestionHow to return the value in Silverlight? [modified] Pin
Tesic Goran13-Feb-11 22:52
professionalTesic Goran13-Feb-11 22:52 
AnswerRe: How to return the value in Silverlight? Pin
Pete O'Hanlon14-Feb-11 0:32
mvePete O'Hanlon14-Feb-11 0:32 
GeneralRe: How to return the value in Silverlight? Pin
Tesic Goran14-Feb-11 0:56
professionalTesic Goran14-Feb-11 0:56 
GeneralRe: How to return the value in Silverlight? Pin
Pete O'Hanlon14-Feb-11 0:58
mvePete O'Hanlon14-Feb-11 0:58 
GeneralRe: How to return the value in Silverlight? Pin
Tesic Goran14-Feb-11 2:04
professionalTesic Goran14-Feb-11 2:04 
GeneralRe: How to return the value in Silverlight? Pin
Mycroft Holmes14-Feb-11 13:32
professionalMycroft Holmes14-Feb-11 13:32 
GeneralRe: How to return the value in Silverlight? Pin
Tesic Goran14-Feb-11 19:29
professionalTesic Goran14-Feb-11 19:29 
GeneralRe: How to return the value in Silverlight? Pin
Tesic Goran14-Feb-11 22:12
professionalTesic Goran14-Feb-11 22:12 
GeneralRe: How to return the value in Silverlight? Pin
Mycroft Holmes14-Feb-11 23:14
professionalMycroft Holmes14-Feb-11 23:14 
GeneralRe: How to return the value in Silverlight? Pin
Tesic Goran15-Feb-11 0:28
professionalTesic Goran15-Feb-11 0:28 
GeneralRe: How to return the value in Silverlight? Pin
Mycroft Holmes15-Feb-11 13:27
professionalMycroft Holmes15-Feb-11 13:27 
GeneralRe: How to return the value in Silverlight? Pin
Pete O'Hanlon16-Feb-11 7:37
mvePete O'Hanlon16-Feb-11 7:37 
GeneralRe: How to return the value in Silverlight? Pin
Tesic Goran17-Feb-11 1:27
professionalTesic Goran17-Feb-11 1:27 
GeneralRe: How to return the value in Silverlight? Pin
Tesic Goran17-Feb-11 3:18
professionalTesic Goran17-Feb-11 3:18 
GeneralRe: How to return the value in Silverlight? Pin
Pete O'Hanlon17-Feb-11 8:44
mvePete O'Hanlon17-Feb-11 8:44 
Questionwpf mvvm pattern Checkboxes to be checked by default. Pin
Himanshu0614198213-Feb-11 20:40
Himanshu0614198213-Feb-11 20:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.