Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COAgreed, excessive purity, whether with MVVM or any other pattern, becomes counterproductive. I've seen people saying that you shouldn't even use value converters because your view model should be doing all the work -- a surefire recipe for tight coupling and architectural fail. MVVM is a (very) useful guiding principle to *how to think* in WPF so as to make your code simple and decoupled. It should never become a stick with which to beat your code into an unnatural mess of twisted complexity.
      singulars
    2. COThe original question mirrors my own frustrations trying to do pure MVVM and I like your answer, however I'd like to point out that when learning a new pattern, particularly one as othello-like as MVVM (easy to learn, difficult to master), the best way to approach that learning is to do everything you can to force yourself into pattern purity. Only after you've learned the hard lessons can you gain the experience necessary to know when and how to break the pattern.
      singulars
    3. CO@Randolpho: You make a very good and cogent point, and I completely agree. I strive for purity of my understanding of the pattern in most of my personal projects, and certainly the small ones. I think MVVM in particular is tricky because there's so much gray area wrt what belongs in the view vs the view model. My personal opinion is that anything that doesn't affect application state stays out of the VM and in the view (maybe even the codebehind!), but am I then writing something more like an MVP? Dunno. Very subtle stuff!
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload