introduction to .net core 1adiftene/scoala/2020/aset/courses/aset… · introduction to .net florin...

Post on 17-Aug-2020

6 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Introduction to .NET

Florin Olariu

“Alexandru Ioan Cuza”, University of Iași

Department of Computer Science

Agenda

Recap

Bridge to our current course

What is Fitness Function?

What is architectural Fitness Function?

Demo 1

Demo 2

Architectural patterns

Architectural patterns – hexagonal

architecture

Architectural patterns – onion

architecture

Architectural patterns –Clean

Architecture

Architectural patterns –Clean

Architecture

The big picture of Clean Architecture

Clean Architecture rules

Clean Architecture rules

The application Core contains the Domain

Clean Architecture rules

The application Core contains the Domain

All the projects depends on the Core

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

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)

Clean Architecture features

Clean Architecture features

Framework independent

Clean Architecture features

Framework independent

Database independent

Clean Architecture features

Framework independent

Database independent

UI independent

Clean Architecture features

Framework independent

Database independent

UI independent

Testable

Clean Architecture details

Clean Architecture details

Domain

Clean Architecture details

Domain

Interfaces

Clean Architecture details

Domain

Interfaces

Domain events and events handlers

Clean Architecture details

Domain

Interfaces

Domain events and events handlers

Entities(value objects/aggregate roots)

Clean Architecture details

Domain

Interfaces

Domain events and events handlers

Entities(value objects/aggregate roots)

Domain services

Clean Architecture details

Domain

Interfaces

Domain events and events handlers

Entities(value objects/aggregate roots)

Domain services

Exceptions

Clean Architecture details

Infrastructure

Clean Architecture details

Infrastructure

Repositories

Clean Architecture details

Infrastructure

Repositories

DbContext (EF Core)

Clean Architecture details

Infrastructure

Repositories

DbContext (EF Core)

Adapters (Logging)

Clean Architecture details

Infrastructure

Repositories

DbContext (EF Core)

Adapters (Logging)

Interfaces

Clean Architecture details

Application

Clean Architecture details

Applications

Commands, Commands handlers

Clean Architecture details

Applications

Commands, Commands handlers

Queries, Queries handlers

Clean Architecture details

Applications

Commands, Commands handlers

Queries, Queries handlers

Common – implementations for exceptions, mappings

Bridge to our current course

Bridge to our current course

WebUI Infrastructure

Core(Domain +

Application)

Bridge to our current course

WebUI Infrastructure

Core(Domain +

Application)

Functional

testing

Integration

Testing

Unit testing

Bridge to our current course

WebUI Infrastructure

Core(Domain +

Application)

Functional

testing

Integration

Testing

Unit testing

What is Fitness Function?

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

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

What is architectural Fitness Function?

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.

Demo 1

Demo 1

https://www.ben-morris.com/writing-archunit-style-tests-for-net-and-c-for-

self-testing-architectures/

Demo 2

Bibliography

Pluralsight

Clean Architecture – Uncle Bob

Evolutionary Architecture – Neal Ford

Questions

Do you have any other questions?

Thanks!

See you next time!

top related