title: WinJS: does MVVM, MVP or MVC fit better with it?
body: <p>I am building a simple Windows 8 LOB application using Javascript (WinJS) and HTML. In the application I would not like to have any third party dependencies. When deciding on the application structure I'm debating which pattern would fit best with the technology and the WinJS framework. </p>
  
  <p>My initial thoughts on the main advantages / disadvantages of using these patterns are as follow.</p>
  
  <p><strong>MVVM</strong></p>
  
  <p><img src="https://i.stack.imgur.com/RIEMJ.png" alt="MVVM"></p>
  
  <ul>
  <li>Pro: Clean separation of business logic in the ViewModel, making (unit)testing of the BL  easy</li>
  <li>Con: WinJS only has one-time and one-way databinding implemented out of the box, two-way databinding and commanding (binding to events) is not. These have to be implemented in a custom way (which can get tricky if one wants to stick with mostly declarative syntax on the view).</li>
  </ul>
  
  <p><strong>MVP</strong></p>
  
  <p><img src="https://i.stack.imgur.com/9j5Wl.png" alt="MVP"></p>
  
  <ul>
  <li>Pro: the presenter still contains all of the business logic together with the view logic and can be (unit)tested by itself. No data binding is needed in this approach.</li>
  <li>Con: both the View and the Presenter code will be more verbose than in the case of MVVM as they now have to notify each other on status changes. The View needs to forward events onto the Presenter and the Presenter has to update the View when its state changes.</li>
  </ul>
  
  <p><strong>MVC</strong></p>
  
  <p><img src="https://i.stack.imgur.com/2J3NX.png" alt="MVC"></p>
  
  <ul>
  <li>Pro: the View is very lightweight and no data binding is needed for this approach either.</li>
  <li>Con: the Controller has to register and handle input events (e.g. keyboard and mouse events) as well as contain the business logic. Compated to the ViewModel in MVVM and the Presenter in MVP this class would be the most bloated and somewhat more difficult to (unit) test.</li>
  </ul>
  
  <p>Based on these I would choose MVP to build this app. Could you agree with this or contradict?</p>