Clean Architecture
Clean Architecture
Jason Taylor
jasongtau github.com/jasongt
codingflow.net youtube.com/jasongt
Domain Layer
Application Layer
Presentation Layer
Next Steps
Clean Architecture
Presentation
Application
Independent of frameworks
Testable
Domain
Independent of UI
Independent of database
Repo bit.ly/northwind-traders
Join the Conversation #GOTOCph @JasonGtAu
Clean Architecture Template
.NET Core Template Package
Repo bit.ly/ca-sln
Join the Conversation #GOTOCph @JasonGtAu
Key Points
Domain contains enterprise-wide logic and types
Application contains business-logic and types
Infrastructure contains all external concerns
Presentation and Infrastructure depend only on Application
Infrastructure and Presentation components can be replaced
with minimal effort
Domain Layer
Application Layer
Presentation Layer
Next Steps
Overview
Presentation
Application
Entities
Value Objects
Domain
Enumerations
Logic
Exceptions Infrastructure
Domain Layer
Application Layer
Presentation Layer
Next Steps
Overview
Presentation
Application
Interfaces
Models
Domain
Logic
Commands / Queries
Validators
Exceptions Infrastructure
Domain Layer
Application Layer
Presentation Layer
Next Steps
Overview
Presentation
Application
Persistence
Identity
Domain
File System
System Clock
I’m over Repositories, and No, you don’t need a repository. No, the repository/unit-of-work
definitely over abstracting your But there are many benefits pattern isn’t useful with EF
data layer. and you should consider it! Core.
Domain Layer
Application Layer
Presentation Layer
Next Steps
Overview
Presentation
Application
Razor Pages
MVC
Domain Layer
Application Layer
Presentation Layer
Next Steps
Using the Solution Template
C:\Code\CaTodo>dotnet new -i Clean.Architecture.Solution.Template
C:\Code\CaTodo>dotnet new ca-sln
The template "Clean Architecture Solution" was created successfully.
C:\Code\CaTodo>
bit.ly/ca-sln
bit.ly/northwind-traders
[email protected]
www.ssw.com.au
Sydney | Melbourne | Brisbane