title: MVVM WPF application in 3-tier architecture
body: <p>I'm currently working on a Enterprise WPF LOB Desktop application using the MVVM design pattern. My current Solution structure in my development machine is the following:</p>
  
  <ul>
  <li><strong>Main Project</strong> - WPF application containing all the <strong>Views</strong> (XAML)</li>
  <li><strong>View Model</strong> - Contains all View Models backing up the Views in main project</li>
  <li><strong>BLL</strong> - Business Logic Layer</li>
  <li><strong>DAL</strong> - Data Access Layer - Connects to a MS-SQL server and calls Stored Procedures </li>
  <li><strong>Model</strong> - Contains all business entities</li>
  </ul>
  
  <p>I'm currently not using WCF since everything resides in the same machine at this moment except the database which is in its own server. However,  in the future we are planning to split the code-base into 3-tiers.</p>
  
  <p>The problem I have is that one colleague insists that we should split our application as follows in 3 separate servers/machines:</p>
  
  <ol>
  <li><strong>Presentation Tier</strong> - The client WPF application (<strong>View</strong>) in users machine. This may as well be a Web client application </li>
  <li><strong>Logic Tier server</strong> - The View Model + Model + Business Logic Layer + Data Access Layer</li>
  <li><strong>Data Tier server</strong> - The database server</li>
  </ol>
  
  <p>I cannot conceive the <strong>View Model</strong> living apart(different server) from the <strong>View</strong> and he claims that should be possible.  </p>
  
  <p><strong>EDIT:</strong> My colleague claims that having the View Model in the Server side will ease any future deployments and will make it more maintainable because changes would go only on the server side. However, I've deployed .NET applications using ClickOnce and it is not really a big deal.</p>
  
  <p>From what <a href="http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/4a6e6f7f-f255-4ba3-ba7e-d2a0762a0814" rel="nofollow noreferrer">I have read</a> you can have a WPF client application installed at users computer which contains the View and ViewModel and then expose the services at lower layers through a communication layer like WCF. </p>
  
  <p><a href="https://stackoverflow.com/questions/5141717/compare-between-3-layer-pattern-and-mvvm">This answer in another posts states the following:</a> "In MVVM the UI Layer is separated into two layers. the ViewModel, which is in charge of the Application Logic, and the View, which is in charge solely on presentations."
  Based on that, my fundamental question is, can the View and the ViewModel UI layers reside in separate tiers (servers)? If so, is that recommended? and how could that be accomplished?</p>
  
  <p>Thanks!</p>