The Strategy Pattern Explained and Implemented in Java | Behavioral Design Patterns | Geekific

preview_player
Показать описание

Today, we add another Behavioral design pattern to our Design Patterns in Java series: The Strategy Design Pattern.

Timestamps:
00:00 Introduction
00:31 What is the Strategy Pattern?
02:30 Strategy Pattern Implementation
03:56 The Strategy Pattern Class Diagram
05:17 State vs Strategy
06:36 Recap
07:16 Thanks for Watching!

If you found this video helpful, check other Geekific uploads:

#Geekific #DesignPatterns #StrategyPattern #BehavioralPatterns
Рекомендации по теме
Комментарии
Автор

I seen so many youTuber to learn this pattern in 35 or 30 mint long videos.the funny thing they did not teach me in 35 mint which you just did in 7 mints. superb

benyameenashraf
Автор

God bless you. I was trying to read my textbook for all of these strategies and was ready to throw my laptop at the wall. This is simple to understand even for beginners. Thank you!!

MelissaBrown
Автор

I have seen almost all the design pattern videos on this channel. They are to the point, explain concepts with relevant examples. Kudos!

kulrash
Автор

Clear, simple explanation, great video! I would also add that this pattern not only applies the Single Responsibility and Open-Closed principles, but also the Dependency Inversion. By using this pattern you avoid that your high level modules (in this case, PaymentService) have dependencies with your low level modules (CreditCard implementation, Paypal implementation, Bank transfer implementation, etc)

gerardofranco
Автор

This channel is an amazing complement for the book design patterns, really great to see the patterns explained in video after reading about the details in the book, thank you

lukasaudir
Автор

Fenomenal, as the other videos in the series.
The fact that you gave context, explained differences and showed up an example in only 7:26 mins says a lot of your experience.
Keep it up! You bring so much value into the community 🚀

sergiog
Автор

The interviewer was good. From low to high. ❤

Ramkumar-ujfo
Автор

Great explanation! I've seen a few vids on the strategy pattern but this one definetly stands out :)

mfiveer
Автор

Its so unfortunate that I found your channel only now. Top notch explanation!

adamee
Автор

Thanks for this video I didn't understand it at my university but now I understood all.
Thanks 😊 .

tucanalfavorito
Автор

Really amazing content with real life examples. Good work (y) . Subscribed! :)

anuragtripathi
Автор

Very clear and pragmatic comparison with state pattern.
May be I will spend a week to go through all your tutorials and take notes and then will attend interviews.

Would like to know your profile.

vengateshm
Автор

the first example also violate dependency inversion since the 2 class must depend on abstraction instead of each others .. reducing coupling between the 2 classes

rafik
Автор

I really like how you break this down.

christopherreif
Автор

thanks alot for this video i learnt this example from ur video and same question is asked in interview n they are impressed for it 🎉 thanks alot for the video

fusionmantra
Автор

amazing videos! great explanation, thank you very much.

moisesdepaulodias
Автор

Thanks for those very clear explainations 🙏

rayunn
Автор

Wow great video thanks, what are books or online resources that bridge the gap from “beginner” knowledge such creating a class, for loops , etc .. To best practices and design patterns ?

andersontiban
Автор

Thanks for such an amazing content. Could you please let me know how did you design the intro of this video ? Which app did you use ? Where can I also get such amazing videos for an intro ? Thanks in advance!

mayankpratapsingh
Автор

3:47 - in the main function, you have to set the payment strategy anyways based on the user's choice of payment method. So you will have to have some logic (conditions) around choosing the strategy like you had in the initial code (if (creditCardPayment) { ... } else if (paypalPayment) { ... } ...). How would you elegantly deal with this?

ak-otwn