title: can I use WCF interface as a MVVM Model?
body: <p>My WPF application should receive data from pipe via WCF:
  I'm new to MVVM and I can't understand where to put some stuff. It's clear for me what is View but it not clear what is ViewModel and especially what is Model in my case (in case when WCF involved) The questions are:</p>
  
  <ul>
  <li>what is Model? Do I need special class to represent model? Or Model is WCF server application? What is valid worflow <strong>"WCF Server application ----named pipe-----> ViewModel &lt;--Data binding--> View"</strong> or <strong>"WCF Server application ----named pipe-----> Model&lt;--->ViewModel &lt;--Data binding--> View"</strong></li>
  <li><p>how to refactor code below? where to put all this initialization? to ViewModel? to Model class (if I need it), to special "initialization" class?</p>
  
  <pre><code>public MainWindow()
  {
  ChannelFactory&lt;IManagementConsole&gt; pipeFactory =
  new ChannelFactory&lt;IManagementConsole&gt;(
      new NetNamedPipeBinding(),
      new EndpointAddress(
          "net.pipe://localhost/PipeMBClientManagementConsole"));
  
      IManagementConsole pipeProxy =
        pipeFactory.CreateChannel();
  
      List&lt;ConsoleData&gt; datas = new List&lt;ConsoleData&gt;();
      foreach (StrategyDescriptor sd in pipeProxy.GetStrategies())
      {
          datas.Add(pipeProxy.GetData(sd.Id));
      }
      this.DataContext = datas;
  }
  </code></pre></li>
  </ul>
  
  <p>Can I assume that this is my MVVM Model? :</p>
  
  <pre><code>[ServiceContract]
  public interface IManagementConsole
  {
      [OperationContract]
      ConsoleData GetData(int strategyId);
  
      [OperationContract]
      List&lt;StrategyDescriptor&gt; GetStrategies();
  }
  </code></pre>