Answered by:
Best Practice to Create a Web Application

Question
-
User2012297617 posted
In order to design a web application for an organization, what would be the best way to create the structure for each section?
By folders or by project? Why?
If the project would be something like the following
ContentFolder
- bootstrap.css
- Site.cssInventory <-- Folder or Project?
- Controller
- Model
- ViewProducts <-- Folder or Project?
- Controller
- Model
- ViewDatabaseProject
Shared
- ViewEtc.
Tuesday, July 28, 2020 3:13 PM
Answers
-
User475983607 posted
I see is that this method was recommended using MVC 2. Isn't that outdated?Areas have been around a long time and has not changed much. It's really just a routing scheme.
When do I want to use projects instead of folders?Generally, project are containers for web sites, class libraries, services, business logic layer, data access layer, etc.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, July 28, 2020 6:45 PM
All replies
-
User475983607 posted
Typically, the MVC controllers are in one MVC application and data access is in a separate project. I think you are looking for "Area" in MVC.
ASP.NET Core
https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/areas?view=aspnetcore-3.1
.NET MVC
https://docs.microsoft.com/en-us/aspnet/mvc/videos/mvc-2/how-do-i/aspnet-mvc-2-areas
Tuesday, July 28, 2020 3:34 PM -
User2012297617 posted
Thanks for your reply. Using the Area approach seems similar to using directories to separate the sections of the code, instead of using Projects. The only thing that I see is that this method was recommended using MVC 2. Isn't that outdated?
When do I want to use projects instead of folders?
Tuesday, July 28, 2020 5:14 PM -
User475983607 posted
I see is that this method was recommended using MVC 2. Isn't that outdated?Areas have been around a long time and has not changed much. It's really just a routing scheme.
When do I want to use projects instead of folders?Generally, project are containers for web sites, class libraries, services, business logic layer, data access layer, etc.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, July 28, 2020 6:45 PM -
User2012297617 posted
Thanks for your assistance!
Tuesday, July 28, 2020 8:27 PM -
User-2121988648 posted
You can look for Microservices Architecture it has lot of Advantages in Long Run.
Wednesday, July 29, 2020 9:09 AM