Want to master Clean Architecture? Go here: bit.ly/3PupkOJ Want to unlock Modular Monoliths? Go here: bit.ly/3SXlzSt
@aweklin Жыл бұрын
Love this series. This is the exact same thing I did in one of my projects... Just made life much easier.
@MilanJovanovicTech Жыл бұрын
Awesome! :)
@saddamhossaindotnet Жыл бұрын
Love this series my friend. Keep up the awesome work! 🙂
@MilanJovanovicTech Жыл бұрын
Glad you enjoy it!
@woendi Жыл бұрын
Love this series. Keep up the good work!
@MilanJovanovicTech Жыл бұрын
Glad you enjoy it!
@kasunjalitha2300 Жыл бұрын
Wow great! This is something I asked previously. Thank you so much 😊 please keep up the good work.
@MilanJovanovicTech Жыл бұрын
My pleasure 😊
@acodersjourney Жыл бұрын
Great video! Thanks for sharing your insights and knowledge.
@MilanJovanovicTech Жыл бұрын
Glad it was helpful!
@mylesdavies9476 Жыл бұрын
Great video. A video on Nuget and publishing options would be good as it was mentioned at the end.
@MilanJovanovicTech Жыл бұрын
Yeah, great idea actually. As this is the easiest way to distribute a Shared Kernel :)
@Rhazizi Жыл бұрын
Great video! Thanks for sharing your knowledge.
@MilanJovanovicTech Жыл бұрын
Glad you enjoyed it! :)
@savedbygrace8061 Жыл бұрын
Would you consider adding classes from the application layer like the logging pipeline behavior to the shared kernel?
@MilanJovanovicTech Жыл бұрын
No - the Shared Kernel should be applicable for the domain primarily.
@krccmsitp2884 Жыл бұрын
The Domain should always follow the Infrastructure Ignorance Principle, and you don't want to have leaky abstractions here.
@mohamedal-qadeery6530 Жыл бұрын
Can you show Authentication using Identity following DDD ? thanks for your video
@MilanJovanovicTech Жыл бұрын
Yes
@PeterPeter-jz1hb Жыл бұрын
What are benefits using IDateTimePrivider in shared kerner?
@MilanJovanovicTech Жыл бұрын
Being able to use it from Domain services
@sunzhang-d9v Жыл бұрын
how use@@MilanJovanovicTech
@juankasem4911 Жыл бұрын
Thanks for the video. I believe I've got a couple of questions to ask, however. First, Isn't referencing the shared kernel project in the domain layer violating one of the clean architecture principles which states that the Domain layer should be independent and free of any other project references.? second, Should we create service classes in the domain layer to contain the logic & validations rather than doing that in the application layer (command & query handlers)? and in that case what would be the return type in those handlers, should we use the Result pattern there too?
@MilanJovanovicTech Жыл бұрын
- No, referencing the Shared Kernel isn't a problem. It's just an extension of the Domain anyhow - Domain services are helpful, but I wouldn't overuse them
@pedrosilva1437 Жыл бұрын
I think you should have shown some shared entities and/or value types in this shared kernel video. It would be more representative of how that is described in DDD.
@MilanJovanovicTech Жыл бұрын
Agreed
@SiyawashZahedi Жыл бұрын
For Each bounded context we have four layers (domain, app, infra, Presentation)?
@MilanJovanovicTech Жыл бұрын
Bounded context is most relevant to the Domain
@SiyawashZahedi Жыл бұрын
@@MilanJovanovicTech so we have multiple Domain projects?
@sunzhang-d9v Жыл бұрын
error :("Email.Empty", "Email is empty"), everytime print :("The value of a failure result can't be accessed")?
@MilanJovanovicTech Жыл бұрын
Good thing
@sunzhang-d9v Жыл бұрын
return new Email(email); return type is Result ,why? no error?
@MilanJovanovicTech Жыл бұрын
Implicit operators
@gusflopes Жыл бұрын
I didn't get the reason behid the DateTimeProvider. Doesn't it already exists as default in the language? The purpose is to limit to only use UtcNow or something?
@MilanJovanovicTech Жыл бұрын
It was only added in .NET 8
@gusflopes Жыл бұрын
@@MilanJovanovicTech thanks for clarifying 👍
@svorskemattias Жыл бұрын
No, this is wrong, I think. This is not what a Shared Kernel is. The Shared Kernel is a Bounded Context just like other forms of Bounded Contexts. It contains domain entities that teams agree to share because they are so common! All teams that are invited to use the bounded context should have a say in how changes are to be made within the Shared Kernel. The base Entity model, Result object etc just belongs in some library. They´re just technical aspects of implementing DDD in whatever language and won't show up in your context map.
@MilanJovanovicTech Жыл бұрын
Well, if you watch the part where I talk about the share diagram - that's basically what I said
@svorskemattias Жыл бұрын
The share diagram?
@clem_grim Жыл бұрын
I totally agree, I was thinking the same. This video is more about "how to share common base classes to reduce duplication" and that does not seem related to what a shared kernel is in DDD.
@sunzhang-d9v Жыл бұрын
public static implicit operator Result(Error error) => Failure(error); ok?
@MilanJovanovicTech Жыл бұрын
Implicit can't know the generic argument
@ahmedgaber3714 Жыл бұрын
Thank you ♥️ . What is your theme
@MilanJovanovicTech Жыл бұрын
ReSharper syntax highlighting
@sunzhang-d9v Жыл бұрын
public static implicit operator Result(TValue? value) => value is not null ? Success(value) : Failure(Error.NullValue); Email create() , return null, Not executed ,It feels like a lot of error value tests are problematic,
@MilanJovanovicTech Жыл бұрын
Can't use the generic version with implicit operator
@sunzhang-d9v Жыл бұрын
public static implicit operator Result(TValue? value) => value is not null ?Success(value) : Failure(Error.NullValue) Isn't that what the video shows? why see : Can't use the generic version with implicit operator @@MilanJovanovicTech
@kasunjalitha2300 Жыл бұрын
How about making a video regarding multiple IdentityUsers in same application with best practices? Customizing IdentityUser with strongly typed Ids for rich domain model etc... 🤞
@MilanJovanovicTech Жыл бұрын
Identity is on the list, it's coming!
@bas10oli4 Жыл бұрын
No datetimeoffset 😮
@MilanJovanovicTech Жыл бұрын
Never needed it 🤷♂️
@krccmsitp2884 Жыл бұрын
When you're using UTC-only date and time value, there is no reason to use DateTimeOffset at all.
@SalmanShafiq-y3q11 ай бұрын
That's what i am looking for ❤❤ if i use multiple project for multiple bounded context, then should i keep the common thing in application project in SharedKernel? Like, Behaviour, Caching, Some Contracts like ICommand, IQuery etc?
@MilanJovanovicTech11 ай бұрын
I typically have a few projects with cross-cutting concerns. One for each CA layer. So that i don't mix these responsibilities. But you can freely keeping everything in one project, if you want to.
@lukaskuchta1010 Жыл бұрын
Shared kernel is something like building blocks for multiple contexts, isn't it ?
@MilanJovanovicTech Жыл бұрын
Yes
@svorskemattias Жыл бұрын
No
@andreibicu5592 Жыл бұрын
Hi Milan. I usually like your videos and I am 99% into agreement with what you do. Now it's different. 1. I see you marked your domain model as an entity. Shouldn't the entities be a separate model used to map the structure of the tables? This seems wrong. 2. I don't see a reason in adding the validations for the Result class. Why would you throw an exception if the purpose of the Result class is to eliminate that? 3. I would group all the Result types together (Fluent related), but separate from the other abstractions that have no Fluent meaning. I hope this will make sense for you too!
@MilanJovanovicTech Жыл бұрын
1. This is a DDD Entity concept (not an EF entity) But I will still use the same class to map to DB, no need for duplication 2. Defensive coding 3. What do you mean?
@rcstann Жыл бұрын
It's a good, bloody thing that KZbin lets me stop and restart repeatedly. This moves along at a rather surrepitis pace but does eventually click.
@MilanJovanovicTech Жыл бұрын
Learned a new word today 😁
@KritX01 Жыл бұрын
I see more microphone than face
@MilanJovanovicTech Жыл бұрын
Look closer
@adeysam5475 Жыл бұрын
@@MilanJovanovicTech 🤣
@microtech2448 Жыл бұрын
I don't get it. Separating out those abstractions into another project, how that is helping you better manage things. If there were some projects which should not reference domain project just for the Result or its generic version then it makes sense else that all seems a lot of work. That's my opinion.
@MilanJovanovicTech Жыл бұрын
Think about using this across your teams/projects
@sunzhang-d9v Жыл бұрын
😘
@MilanJovanovicTech Жыл бұрын
😁😁
@baranacikgoz Жыл бұрын
I love your videos, but your Result monad implementation (at this video and previous videos, all) really shallow. Only having bind and match does not make 'Result', Result monad should be applicative functor, should have Apply and many more methods
@MilanJovanovicTech Жыл бұрын
You can implement as many or as few of those as you need for the project. This implementation is pretty "complete" for the current project requirements. If I need more in the future, it's not a big deal to add it...
@krccmsitp2884 Жыл бұрын
The Result Type pattern and monads are first of all distinct concepts. It is mostly desirable to implement a Result type as monad, but you're not obliged to it.