.NET Core supported several design patterns, architectures that are useful to make more scalable applications. Based on our architecture selection, our app is going to be more maintainable and testable. Here we will discuss some of them.

1. Clean Architecture

This is one of the Highly Recommended Architectures for its Separation of Concerns. In this project, modules are acting independently of each other. UI, Database, and business login are separated.

Layers

Benefits

2. Onion Architecture

This is Domain centric approach which means Domain (Model) based access throughout the project. Also, it’s like Clean Architecture.

Structure

Benefits

3. Hexagonal Architecture

Here, core logic will be inside the hexagon, and the application mainly focuses on interacting with outside applications.

Components

Benefits

4. Layered Architecture

Traditional approach, often used in smaller or legacy apps.

Layers

Benefits

Drawbacks

Which One Should You Use?

FProject Type Recommended Architecture
Small/Quick API Layered Architecture
Medium to Large API Clean Architecture or Onion
Microservices Clean or Hexagonal
Domain-Driven Design Clean or Onion