Gökhan Gökalp
Software Architect, Blog writer. If you free your mind, you free your code.
Gökhan GÖKALP
09.28.2019
.NET Conf 2019 Turkey
Best practices for Clean Code built with ASP.NET Core
September 28, 2019
Gökhan GÖKALP
Software Architect
http://www.gokhan-gokalp.com
E-mail: gok.gokalp@yahoo.com
LinkedIn: in/gokgokalp
Twitter: @gokgokalp
GitHub: gokgokalp
" Good architecture makes the system easy to understand, easy to develop, easy to maintain, and easy to deploy. The ultimate goal is to minimize the lifetime cost of the system and to maximize programmer productivity. "
― Robert C. Martin, Clean Architecture
" The way you keep software soft is to leave as many options open as possible, for as long as possible. What are the options that we need to leave open? They are the details that don’t matter. "
Robert C. Martin, Clean Architecture ―
Coupling is a measure of the degree of dependence between modules.
Modules should not be tightly coupled to each other.
- is important for Clean Architecture
Separation of concerns is a core principle while designing a good architectures.
Single Responsibility?
The goal is to prevent handling different concerns, in one place.
Business logics
DB operations
UI?
I love spaghetti when I can eat it.
A good design should be:
Single Responsibility?
Important for layered architecture.
Separation of Concerns
Dependency flow
Separation of Concerns
Dependency flow
Hierarchy?
Layers are dependent on each other
Separation of Concerns
Dependency flow
Hierarchy?
How can we achieve more decoupling between layers?
Separation of Concerns
Dependency flow
Hierarchy?
Dependency Inversion Principle
Uncle Bob's "Clean Architecture" concept.
Alistair Cockburn's "Hexagonal Architecture".
Domain-centric design
Core
Dependencies point only inwards
Clean architecture is an overall project design that includes a set of best practices.
Hexagonal architecture is an instance of Clean Architecture.
Core layer
Adapters
Isolated
More clear?
To be able to invert dependencies
Adapter
Isolated &
decoupled
LinkedIn: https://www.linkedin.com/in/gokgokalp
E-mail: gok.gokalp@yahoo.com
Twitter: @gokgokalp
GitHub: gokgokalp
By Gökhan Gökalp
Best practices for Clean Code built with ASP.NET Core - .NET Conf 2019 Turkey
Software Architect, Blog writer. If you free your mind, you free your code.