@sadukie

Contents:

01:22 Why Clean Architecture?
02:56 Layered Architectures
08:57 Architecture Tests for Enforcement
09:58 Demo: eShopOnWeb
16:56 How to Organize Code for Clean Architecture
21:11 Demo: Ardalis' Clean Architecture Template sample application
24:20 Demo: Using Ardalis' Clean Architecture Template
26:25 Learn More - which includes all the links to the repos and sites

@Ardalis

And once again this talk is the most popular (non full day stream) talk in the dotnetconf playlist. Say what you will about Clean Architecture, it remains a very popular if sometimes controversial topic...

N/A

Does the clean architecture change in every new version of dotnet? 😂

@panadolrr

Every. Single. Year.

I had some respect for Steve Smith 15 years ago, but after 10 years listening to the same push to "Clean Architecture" it just makes me roll my eyes.

@tomazkoritnik4072

I would prefer having things in ApplicationCore (and maybe other projects) be organized by functionality. Instead of having folders Entities, Exceptions,Interfaces, Services... I'd rather have one folder for one functionality (vertical-slicing approach). This way one quickly sees which functionalities an application is composed of and it's easier to manage when application grows (otherwise lists just get larger and larger, and no one knows which files belong to which functionality).

@duramirez

I love the Hexagonal Arch, I use it a lot in my projects I feel comfortable working with it, I customized a few things, as usual. But for me it's the best Arch currently.

@sebastiaorelson

At least once a year I have to watch a video about Clean Archtecture with Jason Taylor and Steve Smith using the current .NET version 😅

@ivanpavlovnorth

All these "Clean Architecture" things look like overengineering for me.
But overall the idea from ports and adapter architecture of separating business logic from everything and making it the core of the system is very useful.

@Qrzychu92

I am actually on Team Jimmy Boggard. Just write everything as simple as possible, with code duplication etc, and then refactor away code smells. You will end up writing your own MediatR (so just start with it), and every handler will be in layers - pull data, modify, save (or more those 3). Unit test the modify, integration test the handler - done.

When you refactor, you will extract shared code into a service - don't start with a service. If you are using EF Core, it already is a repository. If you refactor enough, you will actually get to "DDD but no sweat" - and it's great end goal, not starting point.

@BreakerGandalfStyle

I think the example project misses somewhat the point of explaining clean architecture, by explaining how to possible do clean architecture in combination with domain driven design.

@SixOThree

What is the difference between the samples projects and the main projects under root src folder?

edit: I guess I’ll never find out.

@4eJIeHTaHo

UseCases Project? :face-turquoise-covering-eyes:

@hendrikdevloed

The templated Core project uses a MediatR dependency and injects a MediatR-specific "IMediator _mediator", wouldn't that count as a forbidden infrastructure reference? I understand the events have to be passed somewhere, but would that require a more general infra-agnostic interface?

@hyperpaus

Specifications are a great idea in theory but nearly impossible to implement with current technology. In your Core project you are not supposed to know anything about persistence. Yet here you are using .Where() and .Include(). This means your persistence layer needs to be able to parse expressions trees for .Where() and .Include() is just a hard dependency on Entity Framework. In conclusion, this implementation requires your core project to have a dependency to EF, and you can only use EF for writing to a database.

@pablo_bf

where is the link of the video that explains about "Behaviors"?

@nickdrouinmtl

@Aralis, do you have any resources, links or reading on Clean Architecture in the context of a .NET Maui project.  If you know any templates to start from, or repos to emulate, that would be appreciated.

@Rcls01

So the whole notion of clean architecture being different than layered only stems from the fact that .NET allows you to create projects that you can reference, yet build separately, and you want to separate those projects, by defining interfaces in the domain/application project and have your infrastructure project point there, instead of the other way around. In other languages where you don't have project separation, like PHP, that separation is a little weaker. You can easily use dependency inversion to break dependencies in layered architecture. At that point the two differences are; where you define those interfaces and the split between design approaches; technical vs domain (use cases)

"Architecture tests" are also way more commonly called "fitness functions".

@BadDogeU

Comment section likes writing N-tier solutions where there are 100 "services" with vague logical cohesion... and it shows

@kiquenet

For enterprise, cannot use c# dev kit (license terms).
How is experience VSCode without C# dev kit for use Clean Architecture and Net Aspire ?

extensions VSCode you recommended in 2025?

.vscode folder in .gitignore ? good pattern?

great your  code source in github ?

@ChuDevMoHon

I saw your Specification library, it has Specification<T,TResult>, So I wondering that TResult is the kind of DTO? but the DTO is staying at UseCase layer if I write a kind of generic specification so I have to define the TResult be some base DTO Class? that make Core layer depends on the layer which DTO stayed. How do you think about that usecase Ardalis?