I have a question in the planning and structuring of my application and I hope to hear from the most experienced.
Today, in the plan, I have data access (DAL) and the MVC 5 web application in different layers and I know that there is a great need for integration with other systems.
Would it be good to create a Web API 2 tier between DAL and Web MVC 5?
The idea is to centralize the way in which data is accessed, either by the internal application or by third parties. I think that would make maintenance easier, right?
I see three factors to consider:
If data needs to be exposed to a third party via HTTP this architecture is a prerequisite, not an optional one.
If your application doesn't need access levels different from those planned for the api (to the point that it's necessary to do tricks on the api), I don't see the reason to follow another path either.
An API adds a layer between application and bank, and that layer comes at a cost. This cost is only considerable if your application is mission critical (I don't think it is). But look, it's a considerable cost, but it's not unfeasible.