N-Tier best practices when using in MVC application
-
Hello! I am just curious if it would be good practice to have all of my layers in the same project, or should I create a separate project(Web API) as my data layer, for example, and call it from my MVC application. I feel I can still create the separate layers in the same project but just use a controller as the middle layer to call a Web API that would handle the database inquiries, then report back to the controller for the View the user is interacting with. Does this sound like good practices for sticking with n-tier architecture? Thank you!
-
Hello! I am just curious if it would be good practice to have all of my layers in the same project, or should I create a separate project(Web API) as my data layer, for example, and call it from my MVC application. I feel I can still create the separate layers in the same project but just use a controller as the middle layer to call a Web API that would handle the database inquiries, then report back to the controller for the View the user is interacting with. Does this sound like good practices for sticking with n-tier architecture? Thank you!
I think you mean multiple projects in one solution. A project is (usually) an exe or dll (or both). The data layer is usually a dll. Easier (for one person) to work with multiple projects under development when they're in one solution.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food