Simplest Decorator Design Pattern in C#

  Рет қаралды 25,228

Code Radiance

Code Radiance

4 жыл бұрын

Watch and learn a very simple code example about how to implement the Decorator Design Pattern in the C# programming language.
►►►Like this Video? Please be sure to SUBSCRIBE for more:
kzfaq.info?s...
----------My Social Links:
🔴 My Channel: / codefirst
🔴 View Playlists: / codefirst
🔴 My Github: github.com/Nitij
#DecoratorPattern

Пікірлер: 50
@jtjnash
@jtjnash Жыл бұрын
I looked at several explanations before watching this. Yours finally made it simple and easy to understand. Thank you.
@IAmESG
@IAmESG 3 жыл бұрын
Amazing video, would love to see more, though I suggest that you add a UML diagram in the future.
@deepdarkguz9ka729
@deepdarkguz9ka729 3 жыл бұрын
It's very simple explanation, but also it's so useful, thanks for explanation!
@DaveWalker_OakGames
@DaveWalker_OakGames 3 жыл бұрын
Quick and well explained, thanks!
@hocahaenyi7685
@hocahaenyi7685 2 жыл бұрын
Great video!! It may help that we reuse the variable "pizza" and keep re-assigning it to each decorator instance. It makes it clearer that "one thing" is being transformed through decorations. IPizza pizza = new Pizza(); pizza = new CheeseDecorator(pizza); pizza = new TomatoDecorator(pizza); pizza = new OnionDecorator(pizza); ....
@Myrelaxedlife
@Myrelaxedlife 2 жыл бұрын
Good suggestion, thanks
@AriLetsPlays
@AriLetsPlays Жыл бұрын
Thanks for making this easier to understand!
@nandinik7816
@nandinik7816 3 жыл бұрын
This video gave the clear picture. Referring many sites didnt help me. Thanks a lot... Could you also provide videos on designing any architecture
@luizalmeida1209
@luizalmeida1209 3 жыл бұрын
Wow, really clarified it to me, thanks!
@anascimento
@anascimento 4 ай бұрын
Man, you nailed it. If you can made me understand this, you're good at explanation! lol
@charlesopuoro5295
@charlesopuoro5295 Жыл бұрын
Great Job. Thank you for this Charitable Endeavour.
@tharlinhtet97
@tharlinhtet97 2 жыл бұрын
Finally Eminem explained it very well. Thanks alot.
@ivanfernandesgarcia6017
@ivanfernandesgarcia6017 2 жыл бұрын
Thanks for this video!
@ahmedm_seada
@ahmedm_seada 10 ай бұрын
thank you so much for this simple explanation.
@user-sz3nn2lb6u
@user-sz3nn2lb6u 2 жыл бұрын
nice and clean code, clear explanation. thanks.
@Myrelaxedlife
@Myrelaxedlife 2 жыл бұрын
That's pretty good. Thanks for the explanation.
@applicationtest4680
@applicationtest4680 3 жыл бұрын
Best explanation ! I've never had before Thanks so much
@CodeRadiance
@CodeRadiance 3 жыл бұрын
You're very welcome!
@Oluciaano
@Oluciaano 4 жыл бұрын
the video was very good, it dealt with in a simple way, I missed UnitTest and how to do the injection depedency could you include these steps in the next videos? example using FluentAssertion.
@yaolegoleynik
@yaolegoleynik 3 жыл бұрын
Thank you!
@alreadytakenindeed
@alreadytakenindeed Жыл бұрын
Great and very clean video, thank you!
@CodeRadiance
@CodeRadiance Жыл бұрын
Thanks 👍
@vernonvandermerwe3270
@vernonvandermerwe3270 3 жыл бұрын
This was an amazing example, Thank you so much man!!!!
@nikunjrathod1671
@nikunjrathod1671 3 жыл бұрын
Great thanks
@sanelectro062
@sanelectro062 3 жыл бұрын
It was really simple.. Thank you
@CodeRadiance
@CodeRadiance 3 жыл бұрын
Glad it helped!
@GergelyCsermely
@GergelyCsermely 6 ай бұрын
Thanks
@BahawalTV
@BahawalTV 4 жыл бұрын
Good man.
@williamedstrom9575
@williamedstrom9575 Жыл бұрын
The simplicity is great for comprehension, but one question I still have is how to handle other methods not explicitly extended by the decorator.
@kuumaaa
@kuumaaa 3 жыл бұрын
nice and simple :p
@prafulsinghvit
@prafulsinghvit 3 жыл бұрын
wow...what a nice pizza..!! I mean nice tutorial 😂. Keep it up ❤️
@krin3x93
@krin3x93 3 жыл бұрын
Can I also re use the variable "pizza" instead of creating new variables with differenet names and passing them? So that I can only have one instance of pizza being upgraded until It got passed through all decorators?
@vatyunga
@vatyunga 3 жыл бұрын
You misunderstand Variables and Instances.
@codigoseviagens
@codigoseviagens 2 жыл бұрын
I think the same: adding decorators to pizza. At the end, call a pizza type, then show all itens added.
@dietrevich
@dietrevich 2 жыл бұрын
No, he needs to called then for what they are, toppings. That way the references in the code are clearer and understandable. He can use "toppings" for all three and leave pizza as pizza which is what it is.
@Chiramisudo
@Chiramisudo 4 жыл бұрын
What if I want to bundle that functionality into an Attribute so it's as simple as applying an Attribute to a Method and getting the functionality added?
@CodeRadiance
@CodeRadiance 3 жыл бұрын
Nice idea. Will have look into that.
@Chiramisudo
@Chiramisudo 3 жыл бұрын
@@CodeRadiance I look forward to seeing your results. 😉
@BB-Shorts_Edit
@BB-Shorts_Edit 3 жыл бұрын
@@CodeRadiance if you implemented with Attribute, plz share that video link
@dietrevich
@dietrevich 2 жыл бұрын
Instead of calling each decorator reference by specific name, like onion decorator, cheese decorator, etc call them all "toppings" and that way you can interchange the order without having to change the references in their constructors.
@JonahDominguez
@JonahDominguez 3 жыл бұрын
lol i got a bit confused for a moment when you started talking about pizza. i thought it was some programming term i had never heard of
@CodeRadiance
@CodeRadiance 3 жыл бұрын
Lol
@sumitsharma5537
@sumitsharma5537 2 жыл бұрын
Lit!
@SharunKumar
@SharunKumar 2 жыл бұрын
Damn it, now I am craving for pizza
@TiborKoroknai
@TiborKoroknai 3 жыл бұрын
Who puts the cheese on the bottom? :D
@CodeRadiance
@CodeRadiance 3 жыл бұрын
I do. ;}
@bradleyr4451
@bradleyr4451 3 жыл бұрын
your first example spells decorator wrong
@vivekkaushik9508
@vivekkaushik9508 Жыл бұрын
OOP is unnecessarily complicated. I haven't seen any real world implementation of most of these "patterns". Most devs either don't have time or expertise or even interest/enthusiasm to go around playing with objects. People just write code for work. OOP creates more problems than it promises to solve by creating more technical jargon. Composition > Inheritance. That's why JS wins.
@CodeRadiance
@CodeRadiance Жыл бұрын
Yeah js makes composition extremely easy to implement.
@jimiwills
@jimiwills Жыл бұрын
❤️🍕🧑‍💻
Simplest Strategy Design Pattern in C#
13:00
Code Radiance
Рет қаралды 10 М.
C# Observer Pattern Example
14:10
Code Radiance
Рет қаралды 31 М.
ОСКАР vs БАДАБУМЧИК БОЙ!  УВЕЗЛИ на СКОРОЙ!
13:45
Бадабумчик
Рет қаралды 6 МЛН
Хотите поиграть в такую?😄
00:16
МЯТНАЯ ФАНТА
Рет қаралды 2,7 МЛН
LOVE LETTER - POPPY PLAYTIME CHAPTER 3 | GH'S ANIMATION
00:15
WHO LAUGHS LAST LAUGHS BEST 😎 #comedy
00:18
HaHaWhat
Рет қаралды 21 МЛН
C# Chain of Responsibility Design Pattern | Code Examples
19:42
Code Radiance
Рет қаралды 10 М.
Design Patterns  C# - Aprendendo Decorator Pattern em .Net Core
33:42
Design Patterns: Decorator
17:21
Microsoft Visual Studio
Рет қаралды 25 М.
📘 Building Your Nextjs Profile Site with Google Sheets as a CMS
22:23
Adapter Pattern and Decorator Pattern - Tamil
27:16
Dotnet in Tamil
Рет қаралды 2,8 М.
ГОСЗАКУПОЧНЫЙ ПК за 10 тысяч рублей
36:28
Ремонтяш
Рет қаралды 281 М.
Samsung Galaxy 🔥 #shorts  #trending #youtubeshorts  #shortvideo ujjawal4u
0:10
Ujjawal4u. 120k Views . 4 hours ago
Рет қаралды 7 МЛН
Cheapest gaming phone? 🤭 #miniphone #smartphone #iphone #fy
0:19
Pockify™
Рет қаралды 2,9 МЛН
Choose a phone for your mom
0:20
ChooseGift
Рет қаралды 7 МЛН