title: web api vs asp.net mvc api
body: <p>I want to write a app that needs to have 2 things:
  1. REST API so others can retrieve data and display their own ways
  2. The default display is a web page using ASP.NET MVC</p>
  
  <p>So there are some approaches:
  1. Create 2 separate projects, 1 for Web API and another is ASP.NET MVC. The MVC will talk to Web API to get the data &amp; render Views
  2. Create a single ASP.NET MVC project. And create a class that derives from APIController. Then do the similar thing as above.</p>
  
  <p>As I understand, the performance should be the same for both approaches. But after I read <a href="http://encosia.com/asp-net-web-api-vs-asp-net-mvc-apis/" rel="nofollow">this  article</a> , I'm not quite sure.</p>
  
  <p>Quote from article:</p>
  
  <blockquote>
    <p>"You could do that with an ASP.NET MVC “API” by creating a separate
    project for the API, but then you’re still paying the performance
    penalty for your API requests to filter through MVC’s rendering
    pipeline. In simple load testing on my local machine, I’ve found that
    Web API endpoints hosted in console apps are nearly 50% faster than
    both ASP.NET controller actions and Web API endpoints hosted within
    MVC projects."</p>
  </blockquote>
  
  <p>I'm no expert in ASP.NET so I'd love to hear your explanation or advise how to achieve what I want to do.</p>
  
  <p>Also, please enlighten me if I want to use MEF for this project.</p>
  
  <p>Thanks very much.</p>