Monolithic n-layer architecture

Nicola Sergio 60 Reputation points
2025-05-08T14:39:56.9733333+00:00

Hi everyone,

As discussed in this document, an application that has only one project within the solution is considered a monolith.

As discussed in the example this could be considered a 1-layer, 1-tier monolith or 1-layer 3-tier monolith?

How would the project structure change in the case of a modular monolith? How would it change?

ASP.NET Core Training
ASP.NET Core Training
ASP.NET Core: A set of technologies in the .NET Framework for building web applications and XML web services.Training: Instruction to develop new skills.
71 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 76,256 Reputation points Moderator
    2025-05-08T15:46:41.3066667+00:00

    N-tier refers to many devices the application components can be spreaded across. The sample is a 1 tier (while the database is actually a tier, it usually isn’t counted), multiple layer app. It has 3 or 4 layers depending on how you count. A typically 2-tier website would have a webapi application and a web ui application. If microservices are used, each is a tier.

    while the sample has multiple layers, because they are all in the same project, it’s easy for a lower layer to access a higher layer without a formal adapter. Making each layer is own project prevents this from happening.

    when building websites, allowing the exposed ui website direct access to database and other resources is considered a security risk. The ui site should call another service, to access the resources. So for security your site should be 2-tier.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.