Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Typical structure of an ASP.NET solution?

As the title says, I'm interested to know how you typically structure your ASP.NET solutions.

I'm especially interested in ASP.NET WebSite solutions, but information abut other types (WebApplication, MVC) might be interesting as well.

Some specific questions:

  • what/how many projects/assemblies does the solution contain
  • how do you name your class library projects
  • what namespaces do you typically have
  • do you have multiple namespaces per project/assembly or do you have a strict 1:1 relation
  • etc.

Thanks

like image 652
M4N Avatar asked Apr 01 '09 19:04

M4N


People also ask

What is ASP.NET structure?

It is a web framework designed and developed by Microsoft. It is used to develop websites, web applications and web services. It provides fantastic integration of HTML, CSS and JavaScript.

What is a .NET solution?

Solutions are the containers for all your work in VS.NET. A solution contains a project for each build output. (For example, if you want to build a DLL, an EXE, and an MSI Installer file, your solution will contain three projects.) Projects themselves contain source files.

What is ASP.NET Core architecture?

ASP.NET allows you to build high-performance, cross-platform web applications. Patterns like MVC and built-in support for Dependency Injection allow you to build applications that are easier to test and maintain.


1 Answers

One of my projects looks like:

  • Sln
    • Sln.Core
    • Sln.Core.Test
    • Sln.Data
    • Sln.Data.Test
    • Sln.Web
    • Sln.Web.Test

Core is the domain model and domain services, as far as they can be done without stepping into persistence. Data is the persistence layer, which basically means FluentNHibernate definitions and concrete implementations of interfaces defined in Core. Web is the front-end layer.

like image 128
yfeldblum Avatar answered Oct 04 '22 12:10

yfeldblum