Excellent introduction. Wouldn't it be nice to create a CRUD app following this architecture? Create a domain class. Create entities using Entity Framework. 2.1. Implement the repository pattern - Unit of Work. Create an API project to consume Entity Framework. Create a page/component to CRUD the entity. In the same solution - access data using CQRS, Mediator, and any necessary packages. In the same solution - access data from a different data source (MySql for example) so really understand the Repository pattern.
Clear. A few small changes I would use or suggest. The src folder is only a solution folder, not a file folder. So, for those using VSCode or NeoVim or whatever, they don't benefit from this folder structure. I would add also a real file system folder and when I create the projects be sure they are in the src folder as well as the solution folder. Also, having real folders can help with build automation. Actually, you don't really need the solution folders. But, I could go either way on that one. Second, I think it is redundant to put the solution name on the projects. Just call the projects Application, Infrastructure, WebUI.Server etc. If you really want the solution name on the output assemblies you can go into the projects and specify the assembly name that will be created.
As usual, Great video. I had all of my injections in the Server (API) Program class but have moved the injections to the Application layer and it works fine. Better and cleaner. Thanks
Hi Patrick, great introduction video to clean architecture and Blazor. I’m wondering when adding authentication and authorization with the server and wasm how that fits in with the clean architecture as MS pushes its own defaults when using the template that contradict with clean architecture. I’m also curious to see how to add additional user related fields and how to handle them correctly both on the server and wasm project. Since both now usually coexist side by side its a bit confusing. Thanks and keep up the great work!
Every time you say "comment and I'll do an extended video of this" I'm like, I also want that. To be honest this can be a complete series, I already work with clean architecture and Blazor, but I would like to see your take on all the different factors related to clean architecture.
Although I’m not a professional developer, I’m currently building a large application single handed and the biggest confusion I’m facing is that can (or should) I reference the domain objects in the Blazor project or should we keep the model classes also clean by using DTOs? I’ve gone through blogs and StackOverflow and there’s a lot of valid debates out there for both approaches. This is what I was hoping to obtain when I saw the videos’s title. So I guess, if you continue this solution a bit further by creating a real-world example, a lot of such doubts (which I’m sure many people are curious to know) would be answered. Love your content, simple and focused.
I love your videos. In this case, I have to say that under the title "Clean Architecture with Blazor" you have a lot of prerequisites: Mediator/CQRS, dependency injection, interfaces, extension methods, etc. I understood everything you said because I've been dealing with this architecture for a while, but for someone who is starting with this subject, the title is a little bit misleading. I know you have videos on these topics and they've been of great help. Just so you know, I think it would have been better to title the video "Blazor as the presentation layer to CA". In that way people who already know CA and its intricacies would know how to add Blazor to the mix. I love your chanel, keep up the good work! (kudos for explaining the an API is still part of the presentation layer even though it looks like server-side stuff).
This was a good explanation. Thank you. I am thinking about doing a complete series of videos on developing enterprise levels applications, from beginning to end. From Architecture and design to development all the way through to deployment. I would talk about the thought process and making decisions. I hope to create something at simple and clear as this. My focus would be to explain this at the beginner level and then take beginners to the next level.
While reading the book “Clean Architecture” I’ve noticed the focus on individual deployability. So basically to have Interactors/Services at the core, and UI (Blazor) point at that through polymorphic interfaces. So, I was wondering - Can you show an example of that with Clean Architecture and Blazor? Swapping one DLL (Blazor) with another DLL (Which could also just be Blazor for simplicity) without recompiling and redeploying the Interactors/Services? I think that could show the real powers of Clean Architecture and also the OCP.
Vertical slice would be a lot more interesting to me. I wish you had a paid course on VSA with blazor (or maybe extra lessons within your CA course, moving to VSA)
Can you make a video with this implementation with mediatr, cqrs, ef core, redis, and net aspire? Personally I don’t care about the duration, but it will be a good look of all pieces working together as a template. This kind of complete project is good to learn all concepts applied in the real life. Thank you!
Nice. I'd be interested in a video about Blazor and GraphQL - and whether that would still be compatible with the typical CQRS / Mediatr approach which is typically paired with REST.
Great video! Can you make a video using this template in a real-World-example? I am really new to .NET development and I have no idea how to actually use this template.
Very nice, how would it be if I am building Blazor app and MAUI app together? How to reference domain, application and infrastructure layers? do I need to build WebAPI?
i would love to see this more in detail . .. a lot of clean architecture code uses CQRS, they have mediator and all these extra packages, can you do one just as a simple .net core application as is out of the box
This is a nice explanation. However this is just another type of video that does not demonstrate the purpose or value of the clean architecture. Also not a real implementation here. There are bunch of challenges when we apply clean architecture to a real life application. It would be very nice and much more useful to see an implementation of few features ( not a one crud feature which has no challenges at all ) that shows the general implementation by a hands on experience. As a dotnet developer of 20 years, personally I am sick of counter and to-do application demonstrations, beside this type of overly simplified theoretical implementations. I searched for clean architecture implementation in none of the other stacks beside Java and C# is putting this much of attention to it. We have to understand the value of it by seeing pros and cons with an on hands experience. This is just tunnel vision. I appreciate the afford, however this looks like just another "Clean architecture 🔥" video that shows no value of the implementation, created for the sake of clicks and attention. Have a nice day.
I disagree here. I had a lot of doubts when I first started to learn Clean Architecture. This video clarifies few such doubts. So I wish I had such good explanation at the time. So this is definitely going to be helpful for a beginner. For example, I had a query in my mind that the presentation layer is not supposed to reference the domain layer, then how are we supposed to inject services in the Program.cs? So I thought, should it be done through extension methods? And this video confirms my approach. But I hear what you’re saying. Now that the projects are setup, we deserve follow up videos with some business case.
more of this please, thank you for sharing
These Blazor videos are awesome!
Excellent introduction.
Wouldn't it be nice to create a CRUD app following this architecture?
Create a domain class.
Create entities using Entity Framework. 2.1. Implement the repository pattern - Unit of Work.
Create an API project to consume Entity Framework.
Create a page/component to CRUD the entity.
In the same solution - access data using CQRS, Mediator, and any necessary packages.
In the same solution - access data from a different data source (MySql for example) so really understand the Repository pattern.
I personally prefer dapper to entity framework 😊
Clear. A few small changes I would use or suggest.
The src folder is only a solution folder, not a file folder. So, for those using VSCode or NeoVim or whatever, they don't benefit from this folder structure. I would add also a real file system folder and when I create the projects be sure they are in the src folder as well as the solution folder. Also, having real folders can help with build automation. Actually, you don't really need the solution folders. But, I could go either way on that one.
Second, I think it is redundant to put the solution name on the projects. Just call the projects Application, Infrastructure, WebUI.Server etc. If you really want the solution name on the output assemblies you can go into the projects and specify the assembly name that will be created.
As usual, Great video. I had all of my injections in the Server (API) Program class but have moved the injections to the Application layer and it works fine. Better and cleaner. Thanks
Please make service pattern tutorial videos...
Thank you for this video
Please continue with your guided explanation, thank you for sharing
Hi Patrick, great introduction video to clean architecture and Blazor. I’m wondering when adding authentication and authorization with the server and wasm how that fits in with the clean architecture as MS pushes its own defaults when using the template that contradict with clean architecture. I’m also curious to see how to add additional user related fields and how to handle them correctly both on the server and wasm project. Since both now usually coexist side by side its a bit confusing. Thanks and keep up the great work!
Every time you say "comment and I'll do an extended video of this" I'm like, I also want that. To be honest this can be a complete series, I already work with clean architecture and Blazor, but I would like to see your take on all the different factors related to clean architecture.
Which blazor project type do you usually add?
Although I’m not a professional developer, I’m currently building a large application single handed and the biggest confusion I’m facing is that can (or should) I reference the domain objects in the Blazor project or should we keep the model classes also clean by using DTOs?
I’ve gone through blogs and StackOverflow and there’s a lot of valid debates out there for both approaches.
This is what I was hoping to obtain when I saw the videos’s title.
So I guess, if you continue this solution a bit further by creating a real-world example, a lot of such doubts (which I’m sure many people are curious to know) would be answered.
Love your content, simple and focused.
Thank you for these motivating words! I’m excited to keep practicing and getting more comfortable with Clean Architecture. ❤🔥
I love your videos. In this case, I have to say that under the title "Clean Architecture with Blazor" you have a lot of prerequisites: Mediator/CQRS, dependency injection, interfaces, extension methods, etc. I understood everything you said because I've been dealing with this architecture for a while, but for someone who is starting with this subject, the title is a little bit misleading. I know you have videos on these topics and they've been of great help. Just so you know, I think it would have been better to title the video "Blazor as the presentation layer to CA". In that way people who already know CA and its intricacies would know how to add Blazor to the mix. I love your chanel, keep up the good work! (kudos for explaining the an API is still part of the presentation layer even though it looks like server-side stuff).
How does it look in case of using Identity? Is it treated as a part of presentation or should be moved to another layer?
This was a good explanation. Thank you.
I am thinking about doing a complete series of videos on developing enterprise levels applications, from beginning to end. From Architecture and design to development all the way through to deployment. I would talk about the thought process and making decisions. I hope to create something at simple and clear as this. My focus would be to explain this at the beginner level and then take beginners to the next level.
While reading the book “Clean Architecture” I’ve noticed the focus on individual deployability. So basically to have Interactors/Services at the core, and UI (Blazor) point at that through polymorphic interfaces.
So, I was wondering - Can you show an example of that with Clean Architecture and Blazor? Swapping one DLL (Blazor) with another DLL (Which could also just be Blazor for simplicity) without recompiling and redeploying the Interactors/Services? I think that could show the real powers of Clean Architecture and also the OCP.
That was cool, I would like to see you build on it. Like Part II
Vertical slice would be a lot more interesting to me. I wish you had a paid course on VSA with blazor (or maybe extra lessons within your CA course, moving to VSA)
Hey Andrew, VSA will be covered in the .NET Web Academy. So, stay tuned! 😉
Can you make a video with this implementation with mediatr, cqrs, ef core, redis, and net aspire? Personally I don’t care about the duration, but it will be a good look of all pieces working together as a template. This kind of complete project is good to learn all concepts applied in the real life. Thank you!
Nice. I'd be interested in a video about Blazor and GraphQL - and whether that would still be compatible with the typical CQRS / Mediatr approach which is typically paired with REST.
thank you for your support
Great video, easy to understand.
What about the clean architecture with vertical slice, is it similarly approach?
Show us cqrs and mediator pattern also service pattern
Great video! Can you make a video using this template in a real-World-example? I am really new to .NET development and I have no idea how to actually use this template.
Great content! Do u can make a tutorial full project in clean architecture?
its very clean . i really want to see the whole thing built into a crud application
good one, pls have more like that.
Very nice, how would it be if I am building Blazor app and MAUI app together? How to reference domain, application and infrastructure layers? do I need to build WebAPI?
I like this Clean Architecture
great video, I would like to see more about this topic in future videos
Nice video! But we want more detailed and complete example with 2 or more domain entities. Please do that.
i would love to see this more in detail . .. a lot of clean architecture code uses CQRS, they have mediator and all these extra packages, can you do one just as a simple .net core application as is out of the box
Thank you for this
Any time! 😊
Now you have to tell us what you put on these projects
Mediator Architecture pleasee!!
Thank you, kindly show us how to use web API
Привет, спасибо большое за видео 😊
How to add identity to the Clean Architecture from existing project?
can you provide a video with Clean Architecture and .net Aspire?
thanks so much bro :)
Please made a CQRS video
I’d love to see a GitHub repo with just this boiler plate solution setup, so I can peek and poke around myself.
Newer understood why you need write solution name in your projects name? What's the point?
Where is API project ?
Y’a i need a good architecture idea for blazor
more
This is a nice explanation. However this is just another type of video that does not demonstrate the purpose or value of the clean architecture. Also not a real implementation here. There are bunch of challenges when we apply clean architecture to a real life application. It would be very nice and much more useful to see an implementation of few features ( not a one crud feature which has no challenges at all ) that shows the general implementation by a hands on experience. As a dotnet developer of 20 years, personally I am sick of counter and to-do application demonstrations, beside this type of overly simplified theoretical implementations.
I searched for clean architecture implementation in none of the other stacks beside Java and C# is putting this much of attention to it. We have to understand the value of it by seeing pros and cons with an on hands experience. This is just tunnel vision.
I appreciate the afford, however this looks like just another "Clean architecture 🔥" video that shows no value of the implementation, created for the sake of clicks and attention.
Have a nice day.
I disagree here. I had a lot of doubts when I first started to learn Clean Architecture. This video clarifies few such doubts. So I wish I had such good explanation at the time.
So this is definitely going to be helpful for a beginner. For example, I had a query in my mind that the presentation layer is not supposed to reference the domain layer, then how are we supposed to inject services in the Program.cs? So I thought, should it be done through extension methods? And this video confirms my approach.
But I hear what you’re saying. Now that the projects are setup, we deserve follow up videos with some business case.
I hate to say it, but Blazor seems dead in terms of jobs, anyone agree / disagree?