Table of Contents

3 Layer Architecture

A three-layer architecture is a common software design pattern that divides an application into three distinct layers.
A layer is a logically separated part of the application.

Presentation Layer - Handles user clicks, HTTP requests, and provides the API for user interaction.

Domain Layer - Domain(business) logic of the application. This layer handles data and converts it to other data structures.

Data Access Layer - Provides access to the database and manages transactions.

@startuml component "Presentation Layer" { } component "Domain Layer" { } component "Data Access Layer" { }

"Presentation Layer" --> "Domain Layer" "Domain Layer" --> "Data Access Layer"

@enduml

Presentation LayerDomain LayerData Access Layer

Note

Presentation Layer can initiate calls to code from Domain Layer, not vice versa. Domain Layer can initiate calls to code from Data Access Layer, not vice versa.