Тёмный
No video :(

Strategy Design Pattern | NetFlix Video Player | Object Oriented Design Pattern Interview Question 

The Tech Granth
Подписаться 20 тыс.
Просмотров 4 тыс.
50% 1

Strategy Design pattern is a behavioral design pattern which is one of the most commonly used design pattern as it helps with implementation of run time polymorphism and adheres to the SOLID principle which says segregate responsibility of the class.
In this video i have explained it with the help of Netflix Video player which plays video on various devices in various resolutions
You can buy us a coffee at : www.buymeacoffee.com/thetechg...
system design: • System Design | Distri...
DS for beginners: • Arrays Data Structures...
leetcode solutions: • Leetcode 84 | Largest ...
github: github.com/TheTechGranth/theg...
facebook group : / 741317603336313
twitter: / granthtech

Опубликовано:

 

23 сен 2021

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 24   
@SuperWhatusername
@SuperWhatusername 2 года назад
Thanks again question: is it necessary to create TVVideoplayer or PhonePlayer class? Isn't it ok to create videoplayer like you did as a concrete class and then pass the appropriate Device and Resolution objects to it. Just pass what devide and resolution we want directly to Videoplayer. Why need to create concrete TVVideoPlayer class and then pass TV device to it?. lly PhonePlayer and then pass Phone devide to it?
@cewlguy
@cewlguy 2 года назад
Thanks for the video..loved it
@TheTechGranth
@TheTechGranth 2 года назад
Gald it was helpful. Do like and subscribe and share with others 🙂
@kunal4350
@kunal4350 2 года назад
Hey, I am big fan. Please continue creating new videos and big thanks
@TheTechGranth
@TheTechGranth 2 года назад
Yes sure, will come up with new videos soon 🙂 Do like and subscribe and share with others 🙂
@renukaraochaluvadi6829
@renukaraochaluvadi6829 Год назад
Shouldn't the TVVideoPlayer and PhoneVideoPlayer constructor have their corresponding device types in them like TV and Phone ? If not VideoPlayer class's constructor could have done the job?
@supriyasharma6934
@supriyasharma6934 2 года назад
Why is strategy pattern preferred against bridge pattern in this case? Could we have used bridge pattern as well?
@bikashghibila8457
@bikashghibila8457 2 года назад
thanks for video.
@TheTechGranth
@TheTechGranth 2 года назад
Glad it was helpful. Do like and subscribe and share with others 🙂
@arupde6320
@arupde6320 2 года назад
keep uploading good bro
@TheTechGranth
@TheTechGranth 2 года назад
Do like and subscribe and share with others 🙂
@kalai2581
@kalai2581 2 года назад
Thanks for the video, Btw, Do we really need the VideoPlayer class to be an abstract class? Because in the implemented classes (TVVideoPlayer and PhoneVideoPlayer) display() method is same. So why it needs to be an abstract method. We could have a concrete display method in VideoPlayer class and make it as concrete class. In constructor of VideoPlayer class we may inject Device and Resolution. So TVVideoPlayer and PhoneVideoPlayer is not at all needed right?
@debashisdas4364
@debashisdas4364 Год назад
Why constructor, we can use setters and use the same video player object. This way suppose we have 5 devices which supports 5 resolutions. We need to create 25 objects. Waste of memory. We create 1 concrete class video player and use setters to interchange the device and resolution. EVERYTHING DONE USING 1 OBJECT
@ishanshah3309
@ishanshah3309 2 года назад
I didnt get that why do we need TVVideoPlayer and PhonePlayer classes. There isnt any specific things inside those so can't we use a general class for them i.e. VideoPlayer itself? So I dont think VideoPlayer has to be abstract for that reason.
@bikashghibila8457
@bikashghibila8457 2 года назад
in startegy we have context. here there are multipile context. is my understanding right
@TheTechGranth
@TheTechGranth 2 года назад
Basically we have multiple algorithm performing some jobs and we need to pick one at runtime
@pathapatiumeshchandrareddy3198
@pathapatiumeshchandrareddy3198 2 года назад
Hi Thank You for the Videos it help full is there any chance of you can explain the Low Level Design in Python please.
@TheTechGranth
@TheTechGranth 2 года назад
For now the plan is for java. Please try to understand the concept and implement. Do share.the code in comment I will pin it and we can have reviews
@prabhanshusharma1337
@prabhanshusharma1337 2 года назад
Why do we need strategy design pattern if we can directly use run time polymorphism
@TheTechGranth
@TheTechGranth 2 года назад
in hind sight you were already using this pattern, didn't you :)
@nayannandi3596
@nayannandi3596 2 года назад
Sir make a video on charting website like tradingview system design.....
@TheTechGranth
@TheTechGranth 2 года назад
Sure will add this, currently little occupied with my work so not able to upload, will will try to upload soon
@kunalsharma-zc2ho
@kunalsharma-zc2ho 2 года назад
please create more video on Design patterns
@TheTechGranth
@TheTechGranth 2 года назад
Have covered the important ones, will come up with more in future. Do like and subscribe and share with others 🙂
Далее
🛑 до конца!
00:12
Просмотров 68 тыс.
Dependency Injection, The Best Pattern
13:16
Просмотров 780 тыс.
Object Oriented Programming - The Four Pillars of OOP
11:23
SOLID Principles: Do You Really Understand Them?
7:04
Просмотров 148 тыс.