Hibrid Web Application (MVC and Web API)

3

In Visual Studio when we create a web project it gives you the options to dial:

WebForms MVC Web API

When the MVC + Web API framework both are in the same project.

Is there any advantage / performance in using MVC + Web API in the same project or is it better to separate the MVC from the Web API into different projects within the same Solution?

    
asked by anonymous 08.10.2015 / 21:32

2 answers

0

I do not see problems working together, and this will not lead to poor performance. But everything in systems development has to be analyzed in depth, if it is a large MVC project with a diversity of code, it might be better two projects, but, there, the inconvenience of publishing, would have to publish separate in a domain and a sub -domain, so there is not that mess of applications (own experience).

So, analyze the environment, the amount of connection, the work and effort the server will have to do, if it's a medium-sized project, you can do it without fear. Larger projects the division would be the most ideal.

    
08.10.2015 / 21:54
0

There is. The complexity is smaller, the Scaffoldings of one are largely reused in the other and the data context can be the same, avoiding large rework.

Separation should only occur if one interferes with the functioning of the other, in cases such as:

  • Routes
  • Permission
  • Specific isolation needs
13.08.2016 / 20:48