0

I would like to separate my MVC (.Net) website in different projects following 3-layer architecture:

  • Data Access: Model
  • Business Logic: Repositories
  • Presentation: Controller, View

Is my structure correct?

1
  • You could try using WEB API. Commented Oct 22, 2013 at 12:23

1 Answer 1

2

MVC and a layered architecture can be used in different ways, so it's not about right or wrong here. The common ground is that the view part is always in the presentation layer.

Then you can have your controllers either in the presentation layer or in the business layer. For simpler applications, there is sometimes no distinction between a business layer and the controllers.

There can be several model parts in a tiered application. The data access layer definitely needs a model. This model can be shared among the layers, or can be transformed into different models that may be better suited for the presentation layer.

Often the MVC pattern is used inside the presentation layer only, or rather the presentation layer is realized using the MVC pattern.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.