How to build the ViewModel in MVVM not to violate the Single Responsibility Principle?

Posted by Przemek on Stack Overflow See other posts from Stack Overflow or by Przemek
Published on 2009-02-27T21:42:44Z Indexed on 2010/03/22 13:51 UTC
Read the original article Hit count: 258

Filed under:
|
|
|

Robert Martin says: "There should never be more than one reason for a class to change".

Let's consider the ViewModel class which is bound to a View. It is possible (or even probable) that the ViewModel consists of properties that are not really related to each other. For small views the ViewModel may be quite coherent, but while the application gets more complex the ViewModel will expose data that will be subject to change for different and unrelated reasons.

Should we worry about the SRP principle in the case of ViewModel class or not?

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about wpf