Structuring Projects in ASP.NET
Learn about structuring projects within a solution or workspace, including the importance of naming conventions and project types.
How should we structure our projects?
So far, we have built small individual console apps to illustrate language or library features. We will build multiple projects using different technologies that work together to provide a single solution.
Main reason to structure our projects
With large, complex solutions, it can be difficult to navigate through all the code. So, the main reason to structure projects is to make it easier to find components. It is good to have an overall name for our solution or workspace that reflects the application or solution.
We will build multiple projects for a fictional company named Northwind. We will name the solution or workspace PracticalApps
and use Northwind as a prefix for all the project names. There are many ways to structure and name projects and solutions, such as a folder hierarchy and a naming convention. If we work in a team, ensure we know how our team does it.
Structuring projects in a solution or workspace
It is good to have a naming convention for our projects in a solution or workspace so that any developer can tell what each one does instantly. A common choice is to use the type of project, for example, class library, console app, website, and so on, as shown in the following table:
Get hands-on with 1400+ tech skills courses.