title: Correct use of commands
body: <p>So using MVVM, how do the experts handle this situation?</p>
  
  <p>I have a Window with Open/Save menu items, both of which use standard WPF commanding. The Window has an underlying ViewModel containing the command objects. These command objects are instances of simple classes that implement <code>ICommand</code> internface; such as <code>OpenCommand</code> and <code>SaveCommand</code>. The Execute method of each of them calls <code>Open()</code> and <code>Save()</code> functions of the VM respectively. All the standard MVVM stuff you know!</p>
  
  <p>Now the question: When user clicks Open menu item, he may already have made changes to the current document, so I'd want to check that and call <code>Save()</code> function before calling <code>Open()</code>. Who precisely is responsible for doing this and how?</p>
  
  <ol>
  <li>I could do this inside the <code>OpenCommand.Execute()</code> and call <code>SaveCommand.Execute()</code> there.</li>
  <li>I could call <code>VM.Save()</code> function directly inside <code>OpenCommand.Execute()</code>.</li>
  <li>I could call Save() inside the Open() function of my VM too.</li>
  </ol>
  
  <p>From the perspective of being atomic, the Open() function should really only open a document and not do other validation/checks. But then same logic applies to OpenCommand too. So where do I put this functionality?</p>