introduction to .net core 1adiftene/scoala/2020/aset/courses/aset… · introduction to .net florin...
TRANSCRIPT
![Page 1: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/1.jpg)
Introduction to .NET
Florin Olariu
“Alexandru Ioan Cuza”, University of Iași
Department of Computer Science
![Page 2: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/2.jpg)
Agenda
Recap
Bridge to our current course
What is Fitness Function?
What is architectural Fitness Function?
Demo 1
Demo 2
![Page 3: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/3.jpg)
Architectural patterns
![Page 4: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/4.jpg)
Architectural patterns – hexagonal
architecture
![Page 5: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/5.jpg)
Architectural patterns – onion
architecture
![Page 6: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/6.jpg)
Architectural patterns –Clean
Architecture
![Page 7: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/7.jpg)
Architectural patterns –Clean
Architecture
![Page 8: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/8.jpg)
The big picture of Clean Architecture
![Page 9: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/9.jpg)
Clean Architecture rules
![Page 10: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/10.jpg)
Clean Architecture rules
The application Core contains the Domain
![Page 11: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/11.jpg)
Clean Architecture rules
The application Core contains the Domain
All the projects depends on the Core
![Page 12: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/12.jpg)
Clean Architecture rules
The application Core contains the Domain
All the projects depends on the Core
All the inner projects defines interfaces with the desired behavior and all the
other projects implements those interfaces
![Page 13: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/13.jpg)
Clean Architecture rules
The application Core contains the Domain
All the projects depends on the Core
All the inner projects defines interfaces with the desired behavior and all the
other projects implements those interfaces
We should avoid the direct dependencies on the Infrastructure project
(Startup is the only compromise in .NET Core)
![Page 14: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/14.jpg)
Clean Architecture features
![Page 15: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/15.jpg)
Clean Architecture features
Framework independent
![Page 16: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/16.jpg)
Clean Architecture features
Framework independent
Database independent
![Page 17: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/17.jpg)
Clean Architecture features
Framework independent
Database independent
UI independent
![Page 18: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/18.jpg)
Clean Architecture features
Framework independent
Database independent
UI independent
Testable
![Page 19: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/19.jpg)
Clean Architecture details
![Page 20: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/20.jpg)
Clean Architecture details
Domain
![Page 21: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/21.jpg)
Clean Architecture details
Domain
Interfaces
![Page 22: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/22.jpg)
Clean Architecture details
Domain
Interfaces
Domain events and events handlers
![Page 23: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/23.jpg)
Clean Architecture details
Domain
Interfaces
Domain events and events handlers
Entities(value objects/aggregate roots)
![Page 24: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/24.jpg)
Clean Architecture details
Domain
Interfaces
Domain events and events handlers
Entities(value objects/aggregate roots)
Domain services
![Page 25: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/25.jpg)
Clean Architecture details
Domain
Interfaces
Domain events and events handlers
Entities(value objects/aggregate roots)
Domain services
Exceptions
![Page 26: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/26.jpg)
Clean Architecture details
Infrastructure
![Page 27: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/27.jpg)
Clean Architecture details
Infrastructure
Repositories
![Page 28: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/28.jpg)
Clean Architecture details
Infrastructure
Repositories
DbContext (EF Core)
![Page 29: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/29.jpg)
Clean Architecture details
Infrastructure
Repositories
DbContext (EF Core)
Adapters (Logging)
![Page 30: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/30.jpg)
Clean Architecture details
Infrastructure
Repositories
DbContext (EF Core)
Adapters (Logging)
Interfaces
![Page 31: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/31.jpg)
Clean Architecture details
Application
![Page 32: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/32.jpg)
Clean Architecture details
Applications
Commands, Commands handlers
![Page 33: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/33.jpg)
Clean Architecture details
Applications
Commands, Commands handlers
Queries, Queries handlers
![Page 34: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/34.jpg)
Clean Architecture details
Applications
Commands, Commands handlers
Queries, Queries handlers
Common – implementations for exceptions, mappings
![Page 35: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/35.jpg)
Bridge to our current course
![Page 36: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/36.jpg)
Bridge to our current course
WebUI Infrastructure
Core(Domain +
Application)
![Page 37: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/37.jpg)
Bridge to our current course
WebUI Infrastructure
Core(Domain +
Application)
Functional
testing
Integration
Testing
Unit testing
![Page 38: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/38.jpg)
Bridge to our current course
WebUI Infrastructure
Core(Domain +
Application)
Functional
testing
Integration
Testing
Unit testing
![Page 39: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/39.jpg)
What is Fitness Function?
![Page 40: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/40.jpg)
What is Fitness Function?
“A fitness function is an objective function used to summarize how close a
prospective design solution is to achieving the set aims. In evolutionary
computing, the fitness function determines whether an algorithm has
improved over time.”
Source: Ford, Neal; Parsons, Rebecca; Kua, Patrick. Building Evolutionary
Architectures
![Page 41: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/41.jpg)
What is Fitness Function?
“In other words, as each variant of an algorithm is generated, the fitness
functions determine how “fit” each variant is based on how the designer of
the algorithm defined “fit.””
Source: Ford, Neal; Parsons, Rebecca; Kua, Patrick. Building Evolutionary
Architectures
![Page 42: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/42.jpg)
What is architectural Fitness Function?
![Page 43: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/43.jpg)
What is architectural Fitness Function?
“Architectural fitness functions allow decisions in the context of the
organization’s needs and business functions, while making the basis for those
decisions explicit and testable.”
Source: Ford, Neal; Parsons, Rebecca; Kua, Patrick. Building Evolutionary
Architectures: Support Constant Change (Kindle Locations 303-304). O'Reilly
Media. Kindle Edition.
![Page 44: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/44.jpg)
Demo 1
![Page 45: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/45.jpg)
Demo 1
https://www.ben-morris.com/writing-archunit-style-tests-for-net-and-c-for-
self-testing-architectures/
![Page 46: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/46.jpg)
Demo 2
![Page 47: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/47.jpg)
Bibliography
Pluralsight
Clean Architecture – Uncle Bob
Evolutionary Architecture – Neal Ford
![Page 48: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/48.jpg)
Questions
Do you have any other questions?
![Page 49: Introduction To .NET Core 1adiftene/Scoala/2020/ASET/Courses/ASET… · Introduction to .NET Florin Olariu “Alexandru Ioan Cuza”, University of Iași Department of Computer Science](https://reader036.vdocuments.us/reader036/viewer/2022062415/5fbd351216f85d4961670cb4/html5/thumbnails/49.jpg)
Thanks!
See you next time!