Hey Milan, Great video! I notice in some of your other examples around Aggregate Roots, you'll use an aggregate root class which is just an entity that handles your domain event logic as-well. Have you moved away from Aggregate Root classes/marker interfaces?
@user-fd3yr5eo4g4 сағат бұрын
Please, please, please. We need authorization for SignalR.
@JoseGonzalez-lt9kr4 сағат бұрын
I like how his kick to star the car
@user-pq5cb9ht9u6 сағат бұрын
waiting for the next keyclock video
@DavidSmith-ef4eh9 сағат бұрын
The naive version would be faster if you only had 10 rows in the table...🤣
@LordErnie11 сағат бұрын
Wouldn't you say that double dispatch, in your given case, forces the upper layers to always have access to data persistence objects? I mean it works, but wouldn't you rather just write a wrapper or an abstraction to enforce those rules instead? It's nice to have it right there on the model, but it really stings a bit. Like a work-around for something that you know isn't correct but it works and doesn't violate anything so you leave it be. Rich domain models are nice, but isn't there a boundry to what we consider logic for an entity and logic for data persistance? Even if the resource itself is desynced (your in memory representation of the list isn't accurate, the state in your database is different), wouldn't you say that it would be better to just hook your entity to some event handler that would update the collection (and its contents if needed)? It involves more complexity but it removes the responsibility from the domain model, which shouldn't be bothered with the outside world. Any thoughts on this?
@MilanJovanovicTech10 сағат бұрын
"but it really stings a bit" - it does, because the example I used here kinda sucks. My bad on that. Sometimes I try to hard to share some concept without coming up with a problem the requires it. Your analysis is pretty spot on.
@farzinfaghirnavaz102714 сағат бұрын
eagerly waiting for the next video
@MilanJovanovicTech10 сағат бұрын
Thanks. Did you check the Keycloak videos?
@marceloleoncaceres682615 сағат бұрын
Great example, thanks for sharing your time and knowledge
@MilanJovanovicTech10 сағат бұрын
Most welcome!
@user-cp8hr2zr5k16 сағат бұрын
Hello, how can i publish domain events if i have separate domain and database models?
@MilanJovanovicTech10 сағат бұрын
Publish when mapping from one model to the other
@user-wt2kr9fn1k18 сағат бұрын
Great content!
@MilanJovanovicTech18 сағат бұрын
Thanks a lot :)
@zohorishayesteh157720 сағат бұрын
❤❤❤❤❤❤❤❤❤❤
@MilanJovanovicTech18 сағат бұрын
Much appreciated!
@RoyZASTEROiD22 сағат бұрын
Did u maked any video about using 'iendpointroutebuilder' extension, place of classic controllers?
@MilanJovanovicTech22 сағат бұрын
Try this one: kzfaq.info/get/bejne/edF3eblmx8vPko0.html
@RoyZASTEROiD21 сағат бұрын
@@MilanJovanovicTech thank you very much.
@ordinaryBrownDadКүн бұрын
@MilanJovanovicTech Great demo thanks, can you please explain how Modular Monolith is different from Vertical Slices? To me till now both architecture look similar
@MilanJovanovicTech23 сағат бұрын
Modular monolith is essentially vertical slices on a bigger scale. The nuances is how we control communication and data isolation between modules. I've made a few videos about modular monoliths, you can check them out.
@jimmyahmed5619Күн бұрын
What is the static analysis name?
@MilanJovanovicTech23 сағат бұрын
Showcasing on Friday
@dangerosa01Күн бұрын
We need a special price for Latin America. the price for 1 course is our salary 😂
@MilanJovanovicTech23 сағат бұрын
There already is, check the course page on my website
@mohammadalisehhat2027Күн бұрын
Awesome! Thanks a lot for this great video. I have a concern, if I set some members of a class as internal, how could I write test for these members in another assembly? In that case we don't have access to these internal members! Is there any solution for this problem?
@MilanJovanovicTech23 сағат бұрын
Expose internal members to the unit test assembly
@kimandjasoninfloridaКүн бұрын
Great video, I'm going to try this on my next small project. Would you place the implementation of IPasswordHasher and IUserRepository in the Users Folder?
@MilanJovanovicTech23 сағат бұрын
Yes, we can create an /Infra folder to hold the implementations? Whatever makes sense.
@GiovanniOrlandoi7Күн бұрын
What is the name of this tool? Is it also available for JetBrains Rider?
@MilanJovanovicTechКүн бұрын
Static code analysis, will show in Friday's video You can also check this: www.milanjovanovic.tech/blog/improving-code-quality-in-csharp-with-static-code-analysis
@user-hj6bb9my1fКүн бұрын
Pbkdf2 is also a really old algorithm from early 2000s, Argon2 is the recommended for password hashing now. Also Buffer.BlockCopy is better to get the salt from the concatenated password hash.
@rikudouensofКүн бұрын
Thanks for the video
@MilanJovanovicTechКүн бұрын
You bet
@KristianS93Күн бұрын
Would you generally recommend to create your own JWT implementation rather than using the bearertoken services from identity ?
@MilanJovanovicTechКүн бұрын
No, I recommend using an Identity Provider. But it doesn't hurt to know how things work under the hood. :)
@muhammedalikhan6118Күн бұрын
are nsubstitue and fluentassertions supported by .net8. mine is giving compatibility error
@Alaa_vieКүн бұрын
Nice as always. You are my fovrite youtuber
@MilanJovanovicTechКүн бұрын
Thanks a lot! :)
@KingOfBlades27Күн бұрын
So this is a tool I can download to Visual Studio and it will inform when risks like this occur in the code?
@MilanJovanovicTechКүн бұрын
Static code analysis us built-in with .NET version. This particular error is from the SonarAnalyzer.Csharp package. I'll showcase the entire setup on Friday when I release the full length video.
@habibsalimi674Күн бұрын
can you provide code sample of hashing ?
@MilanJovanovicTechКүн бұрын
This Friday :)
@abo1428Күн бұрын
Maybe also, how in general to write more secure code?
@frontalachivment3604Күн бұрын
What a shady practice that you highlight incorrect statement under my comment. "wow that’s a bad video with wrong information. " - @ryan-heath you were first with talk is cheap comment and now you doing exactly same. Abstraction brings cost, oop is making gaps in memory allocation which is not cpu friendly. Thats video show exactly that. "Clean code" is at some point a way that it looks like "organized code" but its in cost of perfomance. If you make each request as seperate class, its huge allocation cost in real time systems, in big scale you need to think in different way than just i like this "code visual".
@MilanJovanovicTechКүн бұрын
Would've been best to keep under the original comment 🤷♂️
@gryrvnКүн бұрын
Nice... 🙂
@MilanJovanovicTechКүн бұрын
Thanks 😊
@battomisaadi9251Күн бұрын
love your content! Could you make a tutorial on generating presigned URLs and uploading files to an S3 bucket. Thanks for all your great work!"
@MilanJovanovicTechКүн бұрын
Can do, that's a great topic!
@battomisaadi9251Күн бұрын
@@MilanJovanovicTech Thank you so much it's been a 3 days stuck on it i get the url but when i try upload to s3 always fail😢😢😢
@rlarnoКүн бұрын
Good simple video, simple comment though: You are leaking security info by returning "The email is already in use". With a datadump of hacked email/password combos, one could hack into the system. I understand this is a simple tutorial video, and you can't capture all the best practices (like doing this TDD style would make it even better)
@MilanJovanovicTechКүн бұрын
Even large social media networks return info about something like that. Just tested it with Facebook, for example. We could return something more generic like 'That email address is not available'
@rlarnoКүн бұрын
@@MilanJovanovicTech Big companies will probably have other tech to negate the problem (like rate limiting, and other detection methods) and will not allow to data mine their system. We negated this problem by adjusting our flow, as when a user registers we would send an e-mail with a unique link to complete the registration. So 1) the attacker can never know it the email is registered and 2) the user would be made aware his account is potentially exposed. But again, I would not expect you to go all this way or explain it in a nice simple tutorial video.
@maxencemartin6498Күн бұрын
Hi, thank you for the video. I don't know why they don't add some extra endpoints for managing roles associated with User when registering. What the tips in that case ? Implementing a custom endpoint in order to associate role with a user ?
@MilanJovanovicTechКүн бұрын
Yep, have to make something custom
@ahmadaskar3360Күн бұрын
Video on custom validation when implementing validation attribute? Why it shows the error in the modelstate but not on the client?
@MilanJovanovicTechКүн бұрын
Which video?
@ahmadaskar3360Күн бұрын
@@MilanJovanovicTech no, I am asking you if you could do a video on custom validation😁
@ArnonDanon2 күн бұрын
@MilanJovanovicTech returning access token feels to me more like an infrastucture thing for security at the endpoint level than part of the domain itself, I wonder how its feets in the application/domain use case you created here, what abstraction would you pass in to handle it and what would the Handle method return if not a User object?
@MilanJovanovicTechКүн бұрын
It's use case as any other. Why wouldn't it be? The handle method can just return a simple string representing the access token.
@Haru26092 күн бұрын
So configure.UseMicrosoftDependencyInjectionJobFactory(); is deprecated, its one of the first things in the video, so I'm already stuck... Are you aware of how to fix this? Anyway, thanks for the video.