Adapter Design Pattern in Java Theory

  Рет қаралды 184,127

Telusko

Telusko

Күн бұрын

Пікірлер: 40
@SajanKumar-zb2pr
@SajanKumar-zb2pr 5 жыл бұрын
Thanks so much !! i'm asked same example in interview and i answered got selected....
@onatkorucu842
@onatkorucu842 4 жыл бұрын
1. You might be unable to change PilotPen(3rd party library case or an old class that is used by other teams etc.) 2. You want to use dependency injection. So when the available Pen type changes for some reason, you won't have to change AssignmentWork class. Also see open-closed principle. 3. AssignmentWork won't depend on PilotPen this way, so you can remove it from your project easily. 4. If PilotPen gets changed, you will only need to change PilotPenAdapter class.
@lakshyaagarwal4044
@lakshyaagarwal4044 5 жыл бұрын
Man, you are lifesaver
@abishekraju4521
@abishekraju4521 3 жыл бұрын
Holy crap. This must be the best explanation on this topic I've ever seen. I had like a mini eureka moment at the climax of the video, esp. during the pilot pen part. SUBSCRiBED.
@AshokYadav-np5tn
@AshokYadav-np5tn 5 жыл бұрын
i like this real world example of pen, assignment . thanks for this video .
@harshgupta159
@harshgupta159 2 жыл бұрын
So we’ll explained, please create videos for other design patterns too!!
@vishaldindalkop294
@vishaldindalkop294 3 ай бұрын
Thank you for the video
@zilaxion
@zilaxion 4 жыл бұрын
Am I the only one who hears "welcome back idiots" at the beginning? 00:00
@lamiaa4757
@lamiaa4757 4 жыл бұрын
😂😂😂😂😂😂😂😂
@ipranavprashant
@ipranavprashant 10 ай бұрын
😂😂
@eknathtake4920
@eknathtake4920 5 жыл бұрын
Thanks for this tutorial. This is the best tutorial I've got on youtube. It explains very important and tough design pattern in easy steps.
@sukritakhauri648
@sukritakhauri648 Жыл бұрын
great explanation, just wao
@meelmeel123
@meelmeel123 6 жыл бұрын
thanks for saving me for my exam!
@DagestanShop
@DagestanShop 4 жыл бұрын
but cant we just initiliaze Pilot pen writeAssigment method ??
@mixolt23
@mixolt23 3 жыл бұрын
So you could also say it maps methods with different signatures that provide the same logic onto each other?
@atultripathi9166
@atultripathi9166 3 жыл бұрын
Nice explanation
@Plays-wi1yx
@Plays-wi1yx 4 жыл бұрын
Was this video for adapters ?
@mishrajitendra0111
@mishrajitendra0111 5 жыл бұрын
Can we make a standard or generic adapter pattern interface for multiple use case.
@sairawadwa3774
@sairawadwa3774 6 жыл бұрын
I don't get the proper concept like how I would able to use in realtime.sir could you please explain using another example
@meena7222
@meena7222 3 жыл бұрын
Great example
@harshverm776
@harshverm776 3 жыл бұрын
Sir, can you share the Repo of all this.... Design Pattern Lectures...
@TysonGill
@TysonGill 3 жыл бұрын
nicely explained
@wBacz
@wBacz 7 жыл бұрын
I don't understand why just simply not use PilotPen in class Assignment Work instead of using Pen interface in class Assingment Work? Or why just not make and interface with default method write and let class PilotPen implement it and AssigmentWork implement it too.
@mallinani108
@mallinani108 6 жыл бұрын
Let's say PilotPen is implemented in 3rd party library and you don't have access to implement the Pen interface. And one more thing in future some other library or project will provide another type of implementation which is also hasn't implemented pen then adapter pattern will be useful to supply your implementation without worry about implementer. Real time example will be slf4j library if you supply Log4j implementation it uses that, or else you can simply change the logging to logback without changing the code.
@onatkorucu842
@onatkorucu842 4 жыл бұрын
1. You might be unable to change PilotPen(3rd party library case or an old class that is used by other teams etc.) 2. You want to use dependency injection. So when the available Pen type changes for some reason, you won't have to change AssignmentWork class. Also see open-closed principle. 3. AssignmentWork won't depend on PilotPen this way, so you can remove it from your project easily. 4. If PilotPen gets changed, you will only need to change PilotPenAdapter class.
@LuaneCarolineAquinoCavalcanti
@LuaneCarolineAquinoCavalcanti 7 жыл бұрын
Thank you so much!
@RaushanKumar-co3wj
@RaushanKumar-co3wj 8 жыл бұрын
i am searching for all design pattern tutorial from you. If you can you give me the link?
@nincako
@nincako 8 жыл бұрын
why don't you make PilotPen implements Pen instead?
@gijish4u
@gijish4u 8 жыл бұрын
To not change the implementation of PilotPen I suppose. Adapter helps to use both Pen and PilotPen as it is.
@soho1080
@soho1080 8 жыл бұрын
Something seems to be missing here. Where is the original concrete implementation of Pen that the PilotPen needs to adapt to??!!
@AkashGupta-mz5ed
@AkashGupta-mz5ed Ай бұрын
What is director here??
@hasnahoque2817
@hasnahoque2817 7 жыл бұрын
So helpful
@gauravupasani9088
@gauravupasani9088 2 жыл бұрын
The explanation is good however what I don't understand is why do we need a Pen Adapator itself. In the hardware world it makes sense that you repurpose the same charger. Thus you don't have to buy a new one. But why in the software world why not just directly use the pen instead of relying on this adapter thing ?
@pavankumar-si2jv
@pavankumar-si2jv 4 жыл бұрын
Awesome
@mrchedda
@mrchedda 3 жыл бұрын
am I crazy or is this just sub-class with an override method? Why not just explain it that way?
@gunasekart.j3552
@gunasekart.j3552 4 ай бұрын
Anyone in 2024
@littleKingSolomon
@littleKingSolomon Ай бұрын
Here
@sravankumar5634
@sravankumar5634 14 күн бұрын
Me too
@Muhammad55597
@Muhammad55597 8 жыл бұрын
👏🏻👏🏻👏🏻👏🏻👏🏻
@harshdeep1953
@harshdeep1953 4 жыл бұрын
wtf was first example....
Adapter Design Pattern in Java
8:21
Telusko
Рет қаралды 170 М.
Prototype Design Pattern in Java
18:30
Telusko
Рет қаралды 148 М.
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
How To Escape Game Dev Tutorial Hell (3 Steps)
10:16
Ernesto Perez
Рет қаралды 8
Adapter Pattern - Design Patterns (ep 8)
26:36
Christopher Okhravi
Рет қаралды 247 М.
Builder Design Pattern in Java
8:34
Telusko
Рет қаралды 231 М.
Adapter Design Pattern | Explanation with Code in Easy Way! ✌🏻
19:04
Adapter Design Pattern in detail | Interview Question
10:14
Daily Code Buffer
Рет қаралды 8 М.
SOLID Design Principles in java with Example | JavaTechie
34:44
Java Techie
Рет қаралды 201 М.
Composite Design Pattern Practical
17:05
Telusko
Рет қаралды 113 М.
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН