Clean Architecture with ASP.NET Core 3.0 - Jason Taylor - NDC Sydney 2019

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024
  • The explosive growth of web frameworks and the demands of users have changed the approach to building web applications. Many challenges exist, and getting started can be a daunting prospect. Let's change that now.
    This talk provides practical guidance and recommendations. We will cover architecture, technologies, tools, and frameworks. We will examine strategies for organizing your projects, folders, and files. We will design a system that is simple to build and maintain - all the way from development to production. You leave this talk inspired and prepared to take your enterprise application development to the next level.
    Check out more of our talks, courses, and conferences in the following links:
    ndcsydney.com/
    ndcconferences...

Комментарии • 157

  • @themelc
    @themelc 4 года назад +36

    This is pure gold. A really solid architecture. I'm going to be using this in all my future projects. Thank you!

    • @ratowar
      @ratowar 2 года назад +5

      It is a solid architecture, but I wouldn't use it as a silver bullet

  • @datnt001
    @datnt001 Год назад +1

    Table of contents
    00:14 Clean Architecture
    5:18 Domain Layer
    12:18 Application Layer
    30:15 Infrastructure Layer
    43:50 Presentation Layer
    1:00:19 Next Steps (Clean Architecture Template)

  • @TheMiamiVice27
    @TheMiamiVice27 4 года назад +8

    I am amazed how good is this Onion (Clean) architecture! I have experience working with CQRS in a similar way, where we have our custom http pipeline (In that time there was no MediatoR) and I was furious why are we doing it. But as my experience was growing I had an "Aha!" moment when the puzzles matched. Our enterprise is still using some "old" tech but privately I am sold to this architecture. The ability to automatically read all your endpoints (with DTO-s and ViewModels) and build TypeScript Services for accessing backend was an eye-opener for me. Because in the past I was spending too much time writing TS services to match backend endpoints. Thank you Jason for explaining whole solution and pointing out the real stuff!!! Keep up the good work! Greetings from Croatia!

  • @sechabamotaung8552
    @sechabamotaung8552 Год назад

    Havent been this attentive listening to a talk for a really long time.
    Love this project template, thank you.

  • @CodeSbyAniz
    @CodeSbyAniz 4 года назад +4

    GREAT TUTORIAL AS ALWAYS! This channel is providing so much value. Keep up the good work!

  • @fnerf0
    @fnerf0 4 года назад +17

    If you think that audio is ok, it is not. Just double it in the future.

  • @younesk7111
    @younesk7111 4 года назад +7

    Great presentation! I like the way you use the Chain of Responsibility pattern to conform to the Open-Closed Principle. But don't you think the use of MediatR seems invasive in the application layer?
    I also find the validation with annotations more readable, and I don't think they pollute our business objects since they're from a standard library.

    • @sergey5846
      @sergey5846 Год назад

      Validation with annotations is not always flexible enough, especially when you need to make IO calls (DB, external API, etc.).
      Validation annotations will pollute business (domain) entities eventually. Every class, that tries to solve multiple concerns at once, will become a frankenstein monster as time passes. Developers will keep adding new fields/properties/methods and restructure it in ways that will allow you to properly validate the incoming data, to process your business logic, to send data downstream (IO, background processing, etc.) - all at the same time.

  • @sen.alexandru
    @sen.alexandru 3 года назад +2

    Amazingly clear and useful content. Congrats!

  • @Layarion
    @Layarion 3 года назад +3

    NDC, you have *a lot* to learn about audio loudness. This is ludriciously quiet that no normal set of speakers could even hope to play loud enough to be heard by anyone who's not in a vacant library.

  • @IshA-pr5zi
    @IshA-pr5zi 6 месяцев назад

    Thanks for much your best explanation on clean architecture

  • @stefangabor5985
    @stefangabor5985 2 года назад +1

    Hi Jason,
    There are better ways to implement complex rule validations without any changes to code, such as decision matrix, tables and functions, etc. These DTs would be exposed to the administrator and, as business rules evolve, very few changes are needed in the code. Keep in mind, that every line of code change is always likely to introduce bugs and therefore should be avoided at all cost. Again, this has been around since the 80s and has become very popular in recent times.
    Your thoughts?

  • @aslanamca8225
    @aslanamca8225 2 года назад +1

    I'm a beginner yet, but I want to ask a question.
    Diagrams describing clean architecture explain that every layer outside the domain should refer only to the application layer.
    The ASP.NET Core project in the presentation layer seems to reference the infrastructure layer to register the dbcontext class in the IoC Container. Isn't that wrong? If this is true then the asp.net core project needs to refer to each layer and register their services, isn't that a violation?

  • @aiboltoleu155
    @aiboltoleu155 4 года назад +6

    This architecture has been a while in software engineering and it's called ONION architecture.
    I would not say that CQRS is simple to implement. I agree that the idea behind it is simple. However, it implies that you are going to have message queue and materialized views in case you have relational database what makes application really complex if you want to apply CQRS pattern everywhere. Apart from that there is latency between when command persist changes to store and when changed data available for queries. CQRS should be applied wisely and not for each operation in the system.
    What I also don't like is how automaper is used. You get direct dependency on Automapper in query and command classes. What if you want to replace automapper with something else in future.

    • @NightBladePL
      @NightBladePL 4 года назад

      MediatR is supossed to work as in-memory mediator, not your microservice infrastructure bus.
      Yes, the coupling with automapper is very strong in order to provide default common behavior which is mapping entity to vm. This strong dependency is present almost anywhere but lets face it, why would you change it in a mature project anyway.

    • @xxmuffins352xx
      @xxmuffins352xx 4 года назад +1

      I'm not a huge fan of automapper either, to be honest though with the way this application is designed it would be easy to remove it and just write the projections yourself.

  • @Endomorphism
    @Endomorphism 4 года назад +8

    Whats difference bw ddd and clean architecture ?
    I find a lot in common..

  • @stefangabor5985
    @stefangabor5985 3 года назад +4

    Hi Jason,
    Thanks for the inside of this project.
    Looking through the project I find, however, that it is not quite low coupling since you have a dependency on EF Core in the App layer.
    I have been programming for a very long time and back in 80’s we had already built apps which had a better approach to infrastructure layer.
    We changed the RDBS vendor in a .ini file and the entire app was fully functional, regardless of the RDBS vendor.
    I cannot say the same thing about this project.
    Your thoughts?

    • @ali-13392
      @ali-13392 Год назад

      I agree 100%.. Were you able to find an answer for it?

    • @stefangabor5985
      @stefangabor5985 Год назад +1

      @@ali-13392 Absolutely, you must look to the past to find the answer. We built an intermediary layer on top of the repository, data manager layer, so that the UI requests get “transformed” based on the DB schematics requirements.

  • @lario81
    @lario81 4 года назад +1

    Great video - very nice mixture of theoretical architectural layering and concrete implementation in .NET core and the web/database stack related technologies. I think that the template solution would be very useful starting point for a big project.

  • @SuperDranger
    @SuperDranger 4 года назад +1

    who gave this a thumbs down? its really good!!

  • @shahkaleem6601
    @shahkaleem6601 4 года назад +5

    Do you have git repository or something similar.

  • @shayankamalzadeh
    @shayankamalzadeh 4 года назад +4

    Why you use meditR in application layer? Application layer is depends on meditR,is it clean architecture uncle bob?
    I'm confused.

    • @ekhm
      @ekhm 3 года назад

      Same for EF. Application depends on EF Core. That's not so clean.

    • @stefangabor5985
      @stefangabor5985 2 года назад +1

      The entire Mediator idea either, I am not sold to it. It generates a lot of bogus code, completely screws up your POCO objects, your domain model, code reuse, etc.

  • @svntsn715
    @svntsn715 4 года назад +1

    Very interesting, thanks a lot for the clear presentation. I want to rework a heavy ancient monolith app into a clean architecture. The ca project structure you present makes it easy to see where things have to fit in and how. Correct about EFCore, no need to DIY. I'm fan of data annotations but I'll try fluent validation to understand the benefits.

    • @Dpaz2009
      @Dpaz2009 2 года назад

      Fluent validation is pretty cool, it solves the problem of open-closed principal in domain classes.

  • @ladislavmacejak3230
    @ladislavmacejak3230 3 года назад +2

    Does not the fact that Application project references Microsoft.EntityFrameworkCore package make application layer dependant on infrastructure concerns?

  • @nestorguemez4846
    @nestorguemez4846 Год назад

    Excellent content!

  • @Layarion
    @Layarion 3 года назад +1

    To me it seems like c# needs to focus heavily on baking in and streamlining, as much as possible, these interfaces and abstractions. I get that it's got alot like that already, but i feel like it really doesn't do enough to streamline things that keep the code managegable.

    • @stefangabor5985
      @stefangabor5985 2 года назад +1

      C# has nothing to do with it. The way one decide to build your app it is entirely up to you. I agree with you, however, that some if these requests and handlers generates a lot of unnecessary and convoluted code.
      The entire Mediator idea, I am not sold to it. It generates a lot of bogus code, completely screws up your POCO objects, your domain model, code reuse, etc.

  • @Gonkers44
    @Gonkers44 4 года назад +3

    Audio is very low. So now the ad audio blows me out of my chair when they cut in. 😤

  • @trongphan6197
    @trongphan6197 4 года назад +7

    Domain contains enterprise logic vs application contain business logic at the very beginning of the video. Can someone understand what he really mean?

    • @filipenobrega2964
      @filipenobrega2964 4 года назад

      From my understanding, for example: you can have a domain layer that is shared throughout several applications. So the enterprise logic stays the same in your company but the several applications may change

    • @youtube.com-handle
      @youtube.com-handle 4 года назад

      from my understanding this whole thing is to map and convert the POCO (Domain) to DTO (Application) using the Mapper and MediatR while keeping the domain layer intact.
      future work might require different set of rules, i.e. logging every operation, validating requests, maybe changing a critical rule for the employee perse wont necessarily change the whole domain layer, migrating to a different dotnet will cost less.

  • @SuperCustomer007
    @SuperCustomer007 4 года назад +1

    Grate presentation, but for me it's still black area how to customize AplicationUser (f.e FirstName, LastName, Bio, Picture). How and where to deal with this (will it be IdentityDB or ApplicationDB). Looks like it should be part of Domain and Application but ApplicationUser in infrastucture...

  • @sudidav
    @sudidav 4 года назад +4

    What happened to the sound? Thanks anywhere!

  • @jonperada
    @jonperada 2 года назад

    I know this is old, but this confuses me with the key point "No layers depend on Infrastructure layer...". It contradicts what is implemented in the demo solution. The Web UI project depends to Infrastructure project.

  • @jameshoiby
    @jameshoiby 4 года назад

    Yay!!!! The sound is fixed!! Thumbed up immediately! Thanks for the great talk Jason, I love your teachings.

  • @feelingeverfine
    @feelingeverfine 4 года назад

    Thanks for the reupload. I downloaded it and upped it a bit more which works.

  • @ChadGeidel
    @ChadGeidel 4 года назад +2

    Great talk, but it was difficult to follow along as the ToDoItems Queries aren't in the Github repo, nor are they in the Nuget template.

    • @xxmuffins352xx
      @xxmuffins352xx 4 года назад +2

      It looks like they are now. github.com/JasonGT/CleanArchitecture/tree/master/src/Application/TodoLists/Queries

  • @robgrainger5314
    @robgrainger5314 4 года назад +1

    It might be the trivial nature of the example, but as presented it seems to me a textbook case of an Anemic Domain Model.

  • @odairto
    @odairto 2 года назад

    Why the Application Layer is accessing the DBContext? This doesn't responsibility of Infra layer?

  • @denchernov9494
    @denchernov9494 3 года назад

    Thanks for the amazing video!

  • @mi5956
    @mi5956 7 месяцев назад

    I his calmness while talking.

  • @someotherclown
    @someotherclown 4 года назад +2

    Perhaps I missed him mention this, but DbSet is exposed in the Application project creating a dependency on EF Core. Is this desired?

    • @Algorerhythm
      @Algorerhythm 4 года назад +2

      Jason talks about how you could do this by implementing the Unit of Work and Repository design patterns to abstract away EF Core. Watch at ruclips.net/video/5OtUm1BLmG0/видео.html

  • @brainoverflow98
    @brainoverflow98 3 года назад +1

    Good presentation I've seen this a couple of years ago and it gave me a different point of view on architecture. But since then my views are changed.
    According to me most of the time the data model depends on the business logic and the business logic depends on the application type. For example if you choose to build a REST API application you are going to construct your business logic around it and your data model will be designed to fit this business logic. So indirectly your data depends on the application type. Because of that chances are you will never use the same business logic with a different type of application.
    To me it is pointless to try to separate things that can never be separated completely. For this kind of small projects concepts are simple so architecture is relatively “clean” but as projects start to get bigger you start to see concepts that do not fit into any specific layer. Trying to fit them into one layer only leaves you with confusion and wasted hours.
    Layers should appear naturally as you progress in your project while trying to make your code readable with correct abstractions. Modularity and abstractions will be different for every project based on the team structure and the project requirements, you can’t design one size fits all architecture.

  • @adriangutowski_
    @adriangutowski_ 4 года назад

    I will definitely use it. Keep up the good work.

  • @allmhuran
    @allmhuran 4 года назад +2

    Something bothers me deeply about clean architecture, even though on the surface I like it, and it is this.
    How often do you change your database technology, for example, moving from sql, to postgres, to cosmos, to postgres? I'm going to guess that the answer is "not often".
    How often do you change your domain? For example, adding a new poperty or method? I'm goingto guess that the answer is "all the damn time".
    So... the things that change the most have everything depending on them, and the things that rarely change have the fewest things depending on them. And this is... good?

    • @NiamorH
      @NiamorH 4 года назад +1

      This kind of architecture (onion, hexa) is designed to make it easy to modify the domain though, since it is not entangled with any infrastructure stuff, if done properly. The fact that you can easily swap the db provider is more of a consequence (but to be honest, EFcore already makes it easy for you, no matter which architecture you are using).

    • @stefangabor5985
      @stefangabor5985 3 года назад +1

      More often than you might thing. Let’s say for example that you build an ERP which is very successful and that you use a data dictionary. Since this projet has grown out of the original intent you want to take out the entire data dictionary and place it into a different database, for optimization purposes. Building good apps is costly and this is where a good architecture makes all the difference.

    • @allmhuran
      @allmhuran 3 года назад

      @@stefangabor5985 I don't think that's a real comparison. Sure, I can imagine that you start some application using a dinky back end database like MS access or my sql, and you might switch to a real database like sql server or oracle or something ONCE. But you're not likely to be changing your database technology multiple times per year over the life of the application.
      The domain logic, on the other hand, changes with every feature you add. You're probably changing the domain weekly, vs changing the database vendor... what.... once every few years, and even then only in very specific scenarios. Most applications I've ever seen have never switched database vendors, even applications that are a decade, or even *decades*, old.

    • @stefangabor5985
      @stefangabor5985 3 года назад

      @@allmhuran There is also another option, supporting multiple DB at the same time. The ERP is supporting MSSQL, MySQL, Oracle, and PostgreSQL concurrently, trough the implementation of a Data Manager. It is the APP which I was referring to earlier.

    • @allmhuran
      @allmhuran 3 года назад +1

      @@stefangabor5985 How does that make a difference? The point is about code which changes vs code which is stable. You could be supporting a dozen back end technologies, but that doesn't mean that you are constantly rewriting the code. Like "oh, I have to change it all for my SQL clients today, but tomorrow I'm going to undo all that and rewriting it all for my oracle clients"? No.

  • @ivandrofly
    @ivandrofly 4 года назад +2

    the volume is very low

  • @StephenOwen
    @StephenOwen 4 года назад +2

    The audio is better, next time turn those knobs up to 11 because this is still 10% of the volume of the video I just came from.

  • @ecrondilla
    @ecrondilla 3 года назад

    what happened with the volume its very low compare with the ads...

  • @ThereCameAnEcho
    @ThereCameAnEcho 4 года назад +3

    Any plans to offer this in 1080p?

  • @alireza136211
    @alireza136211 4 года назад

    Great presentation, lots of cool techniques.

  • @louenjli897
    @louenjli897 3 года назад

    Hi Taylor,
    First thank you for this great video.
    I'm beginning in this new approach, and I have a little question.
    I have two action one for creating an item in DB and the second is to sending email(notification) after this operation.
    So, what is the best way to do that ?
    It is a good idea to have the two actions in the post of my controller:
    .
    .
    Post:
    mediator.Send(...)
    mediator.Publish(..)
    In first time, the command Send create the itm in DB and after that I use Publish for notification(sending email).
    Do you think it's a good way or is there another solution ?
    Thank you in advance.

  • @aminejadid2702
    @aminejadid2702 3 года назад

    Why the application layer depends on MediatR ?

  • @talktomenowxbmc
    @talktomenowxbmc 4 года назад

    It's bit confusing how to fit in IoC Containers (Autofac or Unity) within this diagram? Should it be part of Infrastructure or Application?

  • @nclong92
    @nclong92 4 года назад

    Great job. Thank for your teaching.

  • @ivandrofly
    @ivandrofly 4 года назад +1

    was looking for something like this

  • @zaingadol2361
    @zaingadol2361 4 года назад

    I need to use volume booster to hear it but the echo is really annoying. Look like in down under (Australia) , everything are reversed.

  • @CrazyPilot333
    @CrazyPilot333 3 года назад +1

    Where can i see all the code?

  • @WahidRezgui
    @WahidRezgui 3 года назад

    Hi, thanks for all what you are doing , I have one question : I cant understand how and when the command validator is invoked and how to return an exception to UI if there is a saving error for example

  • @andriizahr448
    @andriizahr448 4 года назад +1

    32:00 UoW+Repo explanation

  • @ericserafim7954
    @ericserafim7954 4 года назад

    Great talk Jason, thanks!
    God Bless you 37:23

  • @niroshanmanoharan4295
    @niroshanmanoharan4295 3 года назад

    UOW and Repository Patterns 00:31:00

  • @samithraniroshana4089
    @samithraniroshana4089 4 года назад +1

    Audio is very bad. Can you reupload this video with better audio

  • @timhosking
    @timhosking 3 года назад

    If I want to define my database objects independently, how would I do that? I understand it is part of the infrastructure folder of the project. But I want to create a git repository where I can put database table statements, SQL schemas, constraints, etc. I want my .Net code at the lowest level (infrastructure) to call stored procedures. Any advice?

  • @Rene-zq3np
    @Rene-zq3np 4 года назад

    is this neccessary to know for entry level devs ? juniors ? thx

  • @faisalmorensya4936
    @faisalmorensya4936 3 года назад

    you did code using the Surface?!

  • @randomic_bear
    @randomic_bear 4 года назад +1

    Can I reupload this with amplified audio?

    • @TheZigsDk
      @TheZigsDk 3 года назад +1

      Would you believe that this is the reupload with amplified audio?

  • @mohammadj22
    @mohammadj22 4 года назад

    what if the user is not logged in? then it will always throw an exception whether the API is public or need authentication

  • @jonathancharlesbass
    @jonathancharlesbass 4 года назад

    Excellent talk 😎😎😎

  • @CrowJam
    @CrowJam 4 года назад

    Dont have the time to watch this atm, but does this have any relation to Clean Swift (VIP pattern?)

  • @superpcstation
    @superpcstation 4 года назад +1

    Thank you for listening, NDC :)

    • @NDC
      @NDC  4 года назад +2

      We try :)

  • @elertan
    @elertan 4 года назад

    Ah I'm sad, I had already seen this talk! It was awesome and I was hoping for more content haha. Oh well.

  • @abdelrhmanelsaid4589
    @abdelrhmanelsaid4589 4 года назад +2

    Great i have watched the whole video to know where you injected ApplicationDbContext to Domain layer but i didn't get it

    • @deepakpandey9406
      @deepakpandey9406 4 года назад

      It's in infrastructure layer inside dependency Injection class

  • @hanspetervollhorst1
    @hanspetervollhorst1 4 года назад

    Slides would be great to follow along. I am having a hard time following his pace.

  • @nagasudhirpulla
    @nagasudhirpulla 4 года назад

    I was waiting for the audible video since the day it was uploaded

  • @Fasiibcs
    @Fasiibcs 4 года назад

    Hello. Hope you are good.
    You have a class AuditableEntity in core/common project, but you never use it in configuration files.
    I have implemented it as base class for all of my entity configuration, and then now i am calling the "ApplyConfigurationFromAssambly(typeof(contextClass).Assembly);" in OnModelBuilder method. When I am calling the migration command, it returns empty database, empty in Up method of migration file.
    If I give "ApplyConfiguration(new EntityClass()); then it works fine.
    Please let me know the solution.

  • @PaulSebastianM
    @PaulSebastianM 3 года назад

    11:47 I don't understand what he means... that the system clock is an infrastructure dependency... having an IDateTime just proxying DateTime.Now seems redundant.

  • @RajaSingh012
    @RajaSingh012 4 года назад

    Any sample project other than northwind traders

  • @PyaePhyoAung-xi9fh
    @PyaePhyoAung-xi9fh 4 года назад

    Thank You

  • @DriveU836
    @DriveU836 4 года назад

    Can you provide or point to a GIT Repository

  • @Megyez
    @Megyez 4 года назад

    Throwing exception for validation problems, doesn't that go against the definition of exceptions?

    • @bstaffe
      @bstaffe 4 года назад

      If you expect the input to be of a certain kind, but it is not, it's an exceptional behavior and should throw an exception. Especially if it gets past the usual validation coming from the front-end.

  • @Layarion
    @Layarion 3 года назад

    "buisness logic is specific to this application" does he mean it's specific to the software running it, or the "real world application" as in, the approach?

  • @jesperkped
    @jesperkped 4 года назад +1

    Sound is sooooooo low

  • @zihadulislam9
    @zihadulislam9 4 года назад

    tell me, what're the prerequisites for watching the video? I am new in ASP.NET Core.

    • @filipenobrega2964
      @filipenobrega2964 4 года назад +1

      ASP.NET Core installed and an IDE (VS Code, VisualStudio 2019, etc.)

    • @taniax8944
      @taniax8944 4 года назад

      Same as you I did'nt know anything about core,
      Just download the project (it's on github),
      Run it, try to understand,
      if you thinks you do,
      try to add some feature,
      fix your bug when you thinks you can go
      Let's started to build your own

  • @linqlou657
    @linqlou657 4 года назад

    nice talk.

  • @huray9802
    @huray9802 4 года назад

    Is there any way to get this presentation slides? Are anywhere uploaded?

    • @moman3r33
      @moman3r33 4 года назад +3

      files.gotocon.com/uploads/slides/conference_15/984/original/2019GotoCphCleanArchitectureByJasonTaylor.pdf

    • @huray9802
      @huray9802 4 года назад +1

      @@moman3r33 thank you!

  • @Algorerhythm
    @Algorerhythm 4 года назад

    Solution Template: github.com/JasonGT/CleanArchitecture

  • @felipevaldes2873
    @felipevaldes2873 4 года назад

    Thank you for this.
    Can this architecture be applied to Non-relational Databases as well?

    • @Algorerhythm
      @Algorerhythm 4 года назад

      Jason talks about how you could do this by implementing the Unit of Work and Repository design patterns to abstract away EF Core. Watch at ruclips.net/video/5OtUm1BLmG0/видео.html

  • @gonzalofonsecac
    @gonzalofonsecac 4 года назад

    Audio is too slow 😕

  • @SenthilKumaran4u
    @SenthilKumaran4u 4 года назад +3

    Audio is extremely low, please re-upload with proper audio.

  • @ilovepandaypoe6056
    @ilovepandaypoe6056 4 года назад

    still very poor audio me. already 100% but the sound is just 50%

  • @josephr5000
    @josephr5000 4 года назад

    +NDC Conferences: What's wrong with your audio? This talk looks interesting, but I can't hear most of what he's saying which defeats the purpose.

  • @vlasceanuv
    @vlasceanuv 4 года назад +4

    There is a link with the git repo of the project?

    • @erhanalankus
      @erhanalankus 4 года назад +5

      github.com/JasonGT/CleanArchitecture

  • @T___Brown
    @T___Brown 4 года назад

    Guess I am the only one who thinks this solution isn't a good idea. It isn't exactly fast since it uses EF, Automapper and Activator.CreateInstance. I have moved away from EF and am happier for it. Dapper is much simper and faster. CQRS concepts are good but not exactly doing commands with Web API's, maybe if doing GRPC. Web API core 2+ has built in code for doing validations and I agree with not using annotations.

  • @sudhakarreddych
    @sudhakarreddych 4 года назад +1

    Audio is very poor

  • @einfacherkerl3279
    @einfacherkerl3279 4 года назад +1

    Although it seems a fine design, there is too much unnecessary abstraction involved and it feels like over doing some of the stuff. For instance, I see no value in implementing IDateTime and using Now only be injecting a dependency which itself uses DateTime.Now in implementation. Remember that each function call has an overhead and using too many abstractions you are affecting the performance and also having unnecessary dependencies.
    Also in CQRS, the request should directly go to the command or query handler and there should be no intermediaries in between. To me it is sort of convoluted that before the request reaches the actual code (handler) it is intercepted by many pieces of code (IPipelineHandler) where they are not common but are based on what command or query is being handled.
    Object Mapping is fine as long as it is not overdone because the rule for mapping is A) either it should map to exactly one property in target object OR b) it must be ignored. So if you need just one property which is non-ignorable as is mostly the case, you end up modifying every mapping by hand which itself is a painful thing to do.
    .NET is a framework so whatever architecture you build should run side by side, not on top of it by abstracting the .NET framework itself.

  • @umfaninoh
    @umfaninoh 4 года назад

    Link to the repo github.com/JasonGT/CleanArchitecture

  • @jgamer1394
    @jgamer1394 4 года назад

    Source code pls?

  • @PiotrGankiewicz
    @PiotrGankiewicz 4 года назад +12

    An anemic domain, full of { get; set; } entities being processed by "services" is not really a clean approach.

    • @sjrsjr123
      @sjrsjr123 4 года назад

      Is Jason advocating an anaemic model?

    • @PiotrGankiewicz
      @PiotrGankiewicz 4 года назад +2

      I don't think so, yet it would be nice to see (even a very simple) example of a proper aggregate inside a domain, as that's quite often the confusing part for developers (given the "Clean" title) :).

    • @pyrobolser
      @pyrobolser 4 года назад

      Do you have resources on how to apply this or modify his current repo github.com/JasonGT/CleanArchitecture to avoid anemic models?

    • @PiotrGankiewicz
      @PiotrGankiewicz 4 года назад

      Simply put - refactor TodoItem and TodoList into rich domain models, with proper encapsulation etc. where TodoList as an aggregate would be responsible (e.g. via custom methods) to handle TodoItems.

    • @sjrsjr123
      @sjrsjr123 4 года назад

      @@pyrobolser infoq have a great DDD as quickly as possible guide of you're new to the concept of rich domain models and DDD in general.

  • @pragoz7608
    @pragoz7608 2 года назад

    ca-sln does not exist anymore

  • @codingstyle9480
    @codingstyle9480 4 года назад

    Why is the lecturer whispering?

  • @airat.sh21
    @airat.sh21 4 года назад

    If the infrastructure layer will depend on the domain as well, is it weird?

    • @xucongzhan9151
      @xucongzhan9151 4 года назад

      But that's the main point of clean architecture, isn't it? Making it easy to change to another stack for anything on the outer layer.

  • @gabrielilie4460
    @gabrielilie4460 4 года назад

    Hi,
    What is the purpose of the IDateTime interface, can't we just use System.DateTime.Now. Since the DateTime type is part of the System namespace I don't see any value on creating our own abstraction.
    Thanks.

    • @zVolodymyr
      @zVolodymyr 4 года назад +3

      1. If you have time related behaviour, you may want to do unit tests for that
      2. You customer's may be from other timezones
      3. You may want to modify time based on some http header
      4. Etc

    • @supern4ut3
      @supern4ut3 2 года назад +1

      It is to be able to mock the date and validate it in unit tests.

  • @chadiusmaximus9350
    @chadiusmaximus9350 3 года назад

    audio is so slow.

  • @viruslab1
    @viruslab1 4 года назад

    sound is realy bad

  • @m3speedking
    @m3speedking 4 года назад

    he is still a whisperer - twd greetings

  • @matiasasusbigot
    @matiasasusbigot 3 года назад

    audio at 100%