Application Layers and Web API 2

3

I'm having a question in planning and structuring my application and hope to hear from the more experienced.

Today, in the plan, I have data access (DAL) and the MVC 5 Web application in different layers and I know there is a great need for integration with other systems.

My question:

Would it be a good idea to create a Web API 2 layer between DAL and Web MVC 5?

The idea is to centralize the form of data access, either by the internal application or by third parties. I think this would make it easier to maintain, right?

    
asked by anonymous 07.10.2014 / 17:01

1 answer

1

I see three factors to consider:

  • If data needs to be exposed to third parties via HTTP, this architecture is a prerequisite, not an optional one.

  • An API adds a layer between application and database, and this layer has a cost. This cost is considerable only if your application is mission critical (does not seem to be). But see, it's a considerable cost, but it does not make it unfeasible.

  • 07.10.2014 / 19:26