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

WPF

 
GeneralRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
Pete O'Hanlon22-Jul-11 0:02
mvePete O'Hanlon22-Jul-11 0:02 
GeneralRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
SledgeHammer0122-Jul-11 6:39
SledgeHammer0122-Jul-11 6:39 
GeneralRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
Sacha Barber22-Jul-11 11:27
Sacha Barber22-Jul-11 11:27 
GeneralRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
SledgeHammer0122-Jul-11 6:28
SledgeHammer0122-Jul-11 6:28 
GeneralRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
Pete O'Hanlon21-Jul-11 23:27
mvePete O'Hanlon21-Jul-11 23:27 
GeneralRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
SledgeHammer0122-Jul-11 6:45
SledgeHammer0122-Jul-11 6:45 
GeneralRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
Pete O'Hanlon22-Jul-11 9:59
mvePete O'Hanlon22-Jul-11 9:59 
GeneralRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
SledgeHammer0122-Jul-11 10:11
SledgeHammer0122-Jul-11 10:11 
I get your point, and agree to a certain extent, but also disagree to a certain extent Smile | :) .

Do you agree that the model should implement INPC? or do you believe that duty falls to the VM and that the model should just be a simple POCO? I think thats the models job. Why duplicate INPC code in every single VM that uses the model? If the model is already implementing INPC (and INCC), how is that any different from it implementing IEditableObject and IDataErrorInfo?

I am not saying the model should handle everything, it most certainly should not. It should however encapsulate everything to do with an object so the code is centralized and not C&P'ed everywhere.

The VM still has plenty to do: commands, occasional repacking of data, exposing non-model related properties, etc. The model doesn't really expose anything GUI related, thats the VMs job.
GeneralRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
Pete O'Hanlon22-Jul-11 20:44
mvePete O'Hanlon22-Jul-11 20:44 
GeneralRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
_Maxxx_21-Jul-11 13:55
professional_Maxxx_21-Jul-11 13:55 
GeneralRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
BubingaMan25-Jul-11 1:46
BubingaMan25-Jul-11 1:46 
AnswerRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
RobCroll20-Jul-11 1:53
RobCroll20-Jul-11 1:53 
AnswerRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
_Maxxx_21-Jul-11 14:06
professional_Maxxx_21-Jul-11 14:06 
QuestionDynamically changing themes from DLL at run-time Pin
Prasoon Chaudhary19-Jul-11 1:20
Prasoon Chaudhary19-Jul-11 1:20 
AnswerRe: Dynamically changing themes from DLL at run-time Pin
Varsha Ramnani20-Jul-11 21:23
professionalVarsha Ramnani20-Jul-11 21:23 
GeneralRe: Dynamically changing themes from DLL at run-time Pin
Prasoon Chaudhary20-Jul-11 22:42
Prasoon Chaudhary20-Jul-11 22:42 
QuestionFind an empty element in a Silverlight Grid Pin
Neo1010119-Jul-11 0:31
Neo1010119-Jul-11 0:31 
QuestionRe: Find an empty element in a Silverlight Grid Pin
Mark Salsbery19-Jul-11 12:35
Mark Salsbery19-Jul-11 12:35 
QuestionEntity Framework - Sorting Relationproperties Pin
Nicolai Schrade18-Jul-11 22:52
Nicolai Schrade18-Jul-11 22:52 
QuestionPerformance stymied by UIElement_CreateAutomationPeer Pin
Lee Reid16-Jul-11 14:01
Lee Reid16-Jul-11 14:01 
AnswerRe: Performance stymied by UIElement_CreateAutomationPeer [modified] Pin
SledgeHammer0118-Jul-11 10:20
SledgeHammer0118-Jul-11 10:20 
GeneralRe: Performance stymied by UIElement_CreateAutomationPeer Pin
Lee Reid18-Jul-11 16:40
Lee Reid18-Jul-11 16:40 
Questionwpf time picker control in vb.net Pin
prachi_sathep16-Jul-11 0:30
prachi_sathep16-Jul-11 0:30 
AnswerRe: wpf time picker control in vb.net Pin
Kim Breugelmans18-Jul-11 22:07
Kim Breugelmans18-Jul-11 22:07 
AnswerRe: wpf time picker control in vb.net Pin
Oludayo Alli16-Aug-11 2:29
Oludayo Alli16-Aug-11 2:29 

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.