Any Design Pattern, in particular, you would like to see?
@kostasgkoutis8534 Жыл бұрын
I would like to see a video on Pipes and Filters pattern and on State Machines. Together with the Chain of Responsibility, Mediator, and Rule Engine patterns, they form (for me) a logical "pipeline patterns" group (maybe with the Monad pattern as well).
@gui.ferreira Жыл бұрын
That's a big list 😁 Thanks for sharing
@nucasspro1 Жыл бұрын
Thank you so much, after watching this video, now I realize asp net core pipeline is following this pattern
@gui.ferreira Жыл бұрын
Excellent and accurate observation! I'm happy you find this video useful.
@ahmet9424 Жыл бұрын
Great sample app 👍 Thank you.
@gui.ferreira Жыл бұрын
Glad you like it! Thanks!
@sunnypatel1045 Жыл бұрын
I be keep to see your experience with observer and visitor design patterns
@gui.ferreira Жыл бұрын
I'm likely doing one on Visitor soon.
@gui.ferreira Жыл бұрын
Here it is the video on the Visitor Design Pattern kzbin.info/www/bejne/r6quo6dtr7igrJI
@FreeMindInMotion Жыл бұрын
Great explanation. Visitor pattern would be interesting
@gui.ferreira Жыл бұрын
Noted 😉 Anything, in particular, you would like to see on the Visitor Pattern?
@FreeMindInMotion Жыл бұрын
For me the visitor use case is difficult to identify. That's why I chose it 😀 Maybe you have a good example pointing out the double polymorphic dispatch.
@FreeMindInMotion Жыл бұрын
Taking your example with the order I think it could be used, if you have IOrder, PriorityOrder and NormalOrder. Both need to be handled by the different Handlers, but differently by each or at least some handlers based on their concrete type without type checking.
@gui.ferreira Жыл бұрын
@@FreeMindInMotion Let me think about it 😁
@gui.ferreira Жыл бұрын
Here it is the video on the Visitor Design Pattern kzbin.info/www/bejne/r6quo6dtr7igrJI
@moab5102 Жыл бұрын
Thank you that's an excellent video I would like a tutorial about rule engine or specification design pattern keep up the good work
@gui.ferreira Жыл бұрын
Thanks for the suggestion. Added to the content idea list 😉
@saqibali7066 Жыл бұрын
Good example, Please do explain strategy design pattarn.
@gui.ferreira Жыл бұрын
Added to the pipeline! Anything, in particular, you would like to see on Strategy Pattern?
@saqibali7066 Жыл бұрын
@@gui.ferreira how the flow goes ? Is loading web project configuration dynamically is good example mean either I can read configuration from web.config or from dynamoDB
@gui.ferreira Жыл бұрын
@@saqibali7066 I published it weeks ago: kzbin.info/www/bejne/lZy5aJ-GhLF8idk
@saqibali7066 Жыл бұрын
@@gui.ferreirathanks
@starterdev Жыл бұрын
Show us all the design patterns 🥰
@gui.ferreira Жыл бұрын
There's a new one comming soon. 😉
@patbeansoo Жыл бұрын
Good stuff. Subscribed :)
@gui.ferreira Жыл бұрын
Thanks, Vince! Welcome aboard!
@vagnerwentz1189 Жыл бұрын
What is this IDE? JetBrains?
@gui.ferreira Жыл бұрын
JetBrains Rider 🤘
@SimonLomax-qw3dv Жыл бұрын
What colour theme are you using?
@gui.ferreira Жыл бұрын
Hi! Dracula for Rider plugins.jetbrains.com/plugin/12275-dracula-theme
@LucasSantos-yw4nh Жыл бұрын
Do you see any performance downgrade between Chain Of resposibility and Strategy Pattern? Also, is there any technique to find the the best order to fit the handlers in the chain?
@gui.ferreira Жыл бұрын
To be honest, they solve different problems, so it's not fair to compare them. Regarding the order, it depends on the problem they are solving. In the example from the video, order matters. But, in some cases, the Order can be ignored. For example, if you want to apply Authorization restrictions, you may want to start with the least resource-intensive ones. Long story short, it depends on the domain and business context. Did my answer help? 😅
@LucasSantos-yw4nh Жыл бұрын
@@gui.ferreira Yeah, it helped, thanks. But I still think both design patterns solve the open closed principle in order to create new behaviors without the need to change the class. I would like to know more about your point that it solves different problems.
@gui.ferreira Жыл бұрын
@@LucasSantos-yw4nh When I say that they solve different problems it's because Strategy is about having a generic interface that you can use to provide different implementations. On the other hand, a Chain of responsibility is about having a chain of objects which usually go from more detailed to more generic. So, you may solve the same problem with both, but not all the problems.
@xmadcode Жыл бұрын
The Chain Of Responsibility and the Pipeline Patterns would make a fair comparison, not as with the Strategy Pattern, in my opinion
@SteveNgaiCheeWeng Жыл бұрын
can we also refactor it with DDD?
@gui.ferreira Жыл бұрын
Not sure what you are thinking about. For sure, the service/application can be modeled using DDD. However, Design Patterns like the Chain of Responsibility are useful even with DDD. Can you detail your question?
@ghevisartor6242 Жыл бұрын
I wonder if this is correct to use in a case where i don't have a commonality like a "discount approval" but regardless i need to check a bunch of conditions, for example for deleting a file. Basically to get those conditions, in one i have to check the database, in another just some of the file properties. By separating these into their own handler, now i have the DbContext for example just in the first handler and not the other. So i end up with "IsFileInUseHandler", "IsFileOlderThanHandler" and then lastly "DeleteFileHandler" where i do File.Delete(filePath). It seems to work fine and simplify the code, but as you can see from the naming it sounds odd, also the last handler is actually having side effects. Am i trying to force a square in a circle?
@gui.ferreira Жыл бұрын
You are building a pipeline, which is a common practice here. As an example, I've seen many implementations similar to the one you mention in MediatR pipelines (which is a Chain of Responsibility).
@alexandrgoncharov5074 Жыл бұрын
thank you for the video. great explanation
@gui.ferreira Жыл бұрын
Glad you liked it 🙏 Thanks for taking the time to write feedback.
@xmadcode Жыл бұрын
The strategy pattern
@gui.ferreira Жыл бұрын
Added to the list! 😉 Anything you would like to see on Strategy Pattern?
@xmadcode Жыл бұрын
@@gui.ferreira an overview of the pattern with a simple real life implementation in C#, and how can someone spot a use case for the pattern, would a make a great video ;)
@gui.ferreira Жыл бұрын
@@xmadcode Thanks for the Tip. I will think about it!