Clean Architecture Overview

A free video tutorial from Manish Narayan
President - Innovative Institution, Professor of Engineering
Rating: 4.3 out of 5Instructor rating
16 courses
38,581 students
Clean Architecture Overview

Learn more from the full course

Getting Started with .NET Core Clean Architecture

.NET Core Clean Architecture

04:06:12 of on-demand video • Updated September 2019

.Net Core MVC
Clean Architecture
Full Stack Development
English [Auto]
Welcome to getting started with Dotnet core clean Architecture. This is Professor Maneesh Narayan, founder of Innovative Institution. In this course, I'll help you get started with architectural principles. I'll allow you to create your first application. I'll make use of solid principles and best practices supported by Microsoft. We'll use many technologies, including third party packages, to help us structure our solution. I'll walk through step by step guided approach to for all your projects. Solution, structure and folder structure. Whenever you separate or isolate different projects and their purposes into their corresponding folders, directories, and solutions, then you have the ability to have different teams or different teammates work on different. Parts of your application and simultaneously. So that's called responsibility segregation. So if you see in front of you, one of the best practices supported by Microsoft is using a dotnet core clean architectural approach. So on the top left, you'll see that we have an application layer, a web app, or you can say a presentation layer. Next, we have an infrastructure layer and then an application core. All right. So and finally, in the back end, you might have different data sources. You might have SQL, you might have MySQL, Oracle or maybe even a file system. And then your infrastructure project might talk to third party services such as SendGrid for sending email or text messages such as Twilio API. So your presentation layer can be made up of, let's say, an MVC project, which I'll be showing you in this course. It can be a web application, maybe a web forms or spa, a single page application or any other client. It can also be an API itself inside of your ASP.Net Core web app. It can be even an API app. All right. You'll notice that the core app has controllers view models views and also ASP.Net Core identity, which I'll show you how to plug that in when you create your solution. And then you'll notice that the web application or presentation layer has a dependency on application core project and also infrastructure. And it could be during a compile time dependency or a runtime dependency. All right. Now, at the core of your application, which is called the application core, you'll notice we'll be when I create the folders, I'll show you how to separate these projects even deeper. So, for example, application core, you might have all your interfaces there and then your concrete business services that might implement these interfaces. You'll have your entities or your domain objects. Okay. Such as your, let's say, student class or employee class and so on. You could define all your exceptions there. You can have some events going on. I'll show you how to integrate with Mediator to Handle Command Query or KCRW's Principal's Command Query Responsibility Segregation. All right. And if you look at your infrastructure layer, you might have some caching going on. You might define your data or your database context, whether you're using entity framework or maybe dapper or another another third party application or service to handle your data. You might have some caching built in with reddis. You might have third party services that you interact with, such as email, SendGrid or Twilio. All right. And then you might have other APIs, third party APIs that you interact with. Okay. That's at the heart of the infrastructure layer. All right. So there are many variations of this, but let's let's follow a standard and then we'll build on that. And there are certain things we can move around. I'll show you, for example, Viewmodels. I might move that to the application core where we have our entities. We might define viewmodels there as well, So you can kind of mix and match. It's it's up to you, but we'll follow a best practice and then we can build on that. So let's have fun together, build a standard template which remember, you can use this once it's clean set up. You can use this for all of your applications, whether at work or for your school or for any personal project. So let's get started. In the next video, we'll set up a new project using GitHub and we're going from there. Thank you.