Search code examples
asp.netnamespacessolution

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


Solution

  • 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.