The Adapter Pattern Explained and Implemented in Java | Structural Design Patterns | Geekific

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ม.ค. 2025

ความคิดเห็น • 22

  • @anime4u568
    @anime4u568 3 ปีที่แล้ว +35

    The best design patterns series i have ever found online . thank you so much for this masterpiece

    • @geekific
      @geekific  3 ปีที่แล้ว +3

      Wow! Thank you so much :) Glad you liked it!

  • @mattholsten7491
    @mattholsten7491 2 ปีที่แล้ว +4

    A gem of a video. Thanks!

  • @alooooshm
    @alooooshm 2 ปีที่แล้ว +5

    Your methodology is flawless man! Keep it up

    • @geekific
      @geekific  2 ปีที่แล้ว

      Thanks for the support :) Will do!

  • @jasper5016
    @jasper5016 ปีที่แล้ว

    I really liked your Design Patterns series. You talk super fast. Following you is little difficult but content is top notch.

  • @tayyabsami258
    @tayyabsami258 9 หลายเดือนก่อน

    1st time -Watch video -> Ayeein 2nd time watch video -> Clearly understands the concept

  • @carlosjacobfield-sierra3759
    @carlosjacobfield-sierra3759 3 ปีที่แล้ว +2

    Good stuff I liked the real life example

    • @geekific
      @geekific  3 ปีที่แล้ว

      Glad you liked it :)

  • @richardoteri9746
    @richardoteri9746 2 ปีที่แล้ว

    Hidden gem. liked and subscribed

  • @OussamaAQEBLI
    @OussamaAQEBLI 2 หลายเดือนก่อน

    Very good explaining, but i have a question: can't we link the client directly to the adapter, because in the video i can't quite see the necessity to use the Client Interface? For example, a Button (+switch() ) and a Lamp (+turnOn() and +turnOff() ), if we want to add a Kettle with the same functionalities, we can simply add an adapter Ibutton and the Lamp and Kettle classes can implement the interface Ibutton.

  • @answermy2107
    @answermy2107 2 ปีที่แล้ว +1

    simple and perfect

  • @richardcarberry831
    @richardcarberry831 ปีที่แล้ว

    This intermediate object(adapter) can also be used to provide a stable interface for similar components with different interfaces. But I guess that's a combination of the polymorphism and adapter patterns.

  • @Boyarsskiy
    @Boyarsskiy ปีที่แล้ว +1

    Hi, i think in 2:54 you should write: new FancyUIServiceAdapter(fancyUIService); With FancyUIService instance in constructor argument.

    • @geekific
      @geekific  ปีที่แล้ว

      Hello! check 2:49 (the whole point is to not do that)!

    • @Boyarsskiy
      @Boyarsskiy ปีที่แล้ว

      I'm confused, how you will be test it in your unit tests? With DI you can mock FancyUIService, and test only adapter logic.

  • @vengateshm2122
    @vengateshm2122 3 ปีที่แล้ว

    Thank You!

  • @shubhampandey8765
    @shubhampandey8765 11 หลายเดือนก่อน +4

    I hope this video is not sponsored by Zomato ? - An Indian. 😀

    • @geekific
      @geekific  11 หลายเดือนก่อน

      Wish it was xD

  • @jigardoshi2852
    @jigardoshi2852 2 ปีที่แล้ว

    your videos are good, but at certain point I felt there is no breather. I had to pause the video to go over some details.
    Another point I miss is when to use which pattern. I feel sometimes there could be multiple ways of moving forward but which pattern to chose for simplicity ? is there some kind of rule that explains that ?

    • @geekific
      @geekific  2 ปีที่แล้ว +1

      Thanks! You know I always try to work on that, but it is so hard to pick a pace that suits everyone!!
      Concerning the "when" to use each pattern, I try to always start my videos with an example and then transform it using the pattern in question, kind of a before-after experience thought this might help, and yes you are right most of the time there are multiple patterns you can use and apply in a situation :)

  • @hayreddinbarbarossa3132
    @hayreddinbarbarossa3132 หลายเดือนก่อน

    I swear to God, you saved my ass so well that I am convinced you are the second coming of Christ