title: Simple Architecture for ASP.NET MVC using Database First EF
body: <p><strong>Background</strong></p>
  
  <p>I am coming from 3 tier architecture of ASP.NET background. I have used Unit Tests directly on layers and never tried mocking of layers. All application are developed with EF Database First and separate POCOs and Infrastructure project handles the plumbing work of the application. Applications developed are of small to medium size.</p>
  
  <p><strong>Progress so far</strong></p>
  
  <p>Since I started learning ASP.NET MVC, One of the first questions was to how to create layers for solution. For last 15 days I am learning and hunting for good architecture to learn and follow in this and future MVC projects. I have went through following architecture patterns/sites and found them too complex for my own good. Some of the main concerns </p>
  
  <ul>
  <li>Inherit complexity of the project which makes it difficult to work with for new programmers </li>
  <li>Sharp learning curve</li>
  <li>Too many unit tests for every layer to test redundant behaviors (minor) </li>
  <li>Relatively slow compilation during development</li>
  </ul>
  
  <p><strong>Sites / Project I tried</strong></p>
  
  <ul>
  <li>Sharp Architecture </li>
  <li>Onion Architecture </li>
  <li>Neard Dinner </li>
  <li>Project SiLK (Microsoft)</li>
  </ul>
  
  <p><strong>Main Dilemmas</strong></p>
  
  <ul>
  <li>I found that most common thing among these projects is Repository Patterns and Dependency Injection (IoC). Though I do not have anything against it, I found it hard to maintain and understand projects. I have executed fairly large projects with 3 tier architecture, with so-called "tight coupling" with adequate Unit tests to test the project. I feel architecture will be better off without these involved.</li>
  <li>Huge emphasis on TDD and DDD</li>
  <li>Concept of loosely coupled is far stretched</li>
  <li>Loosing focus on MVC as pattern and dominating architecture with other parts</li>
  </ul>
  
  <p><strong>Required</strong> Simple, easy to understand, <strong>maintainable</strong> architecture for MVC projects </p>
  
  <p>Note: I came across this good implementation structure from jimmy bogard’s <a href="http://lostechies.com/jimmybogard/2009/12/09/organizing-asp-net-mvc-solutions/" rel="nofollow">Organizing ASP.NET MVC solutions</a>. I would still appreciate any suggestions on this topic.</p>