The Prototype Pattern Explained and Implemented in Java | Creational Design Patterns | Geekific

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 พ.ย. 2024

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

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

    so many informations in just 7 min amazing job man . i have to rewatch it again and again to take the most out of it . thanks for your time sir really amazing series

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

      Awesome, glad you are enjoying the series

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

    i have rewatched so many times to make sure i have comprehend whats in the 8 mins :). Seasonal devs might grasp quick. Crisp and highly informative videos! thanks.

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

    It is a superb content. It took me 4-5 time of rewatch but now my concepts are clear. Thanks man

  • @tulasidamarla
    @tulasidamarla 6 หลายเดือนก่อน +1

    Wonderful. Now I understood that Java's Cloneable interface is nothing but prototype design pattern. When I read about Cloneable from Effective Java book, I didn't realise that this is prototype design pattern. Thank you very much @Geekific.
    I have observed one difference. With Cloneable instead of calling super class's copy constructor, it invokes super.clone()

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

    honestly your explantions are amazing

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

      Thanks a lot! Glad you are enjoying our videos :)

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

    Very well explained. Thanks.

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

      Glad you liked it! :)

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

    Deep, precise, and clear explanation. Thank you

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

      Glad you think so! Thank you :)

  • @miaougrrpaw
    @miaougrrpaw 3 วันที่ผ่านมา

    Thanks u, you saved my life

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

    How we are setting value of Class attribute in registery the attribute of Car class is private and there is no setters u have shown???

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

      Yes you are right :) This video is about explaining the the ideas behind the Prototype Pattern, and what you mentioned is an implementation detail, that is why I figured it wasn't necessary to show every single class created! Hope this answers your question!

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

      @@geekific understood, So i did according u mentioned can u check my code if i send u over mail or as u suggest.

  • @johantchassem1553
    @johantchassem1553 8 หลายเดือนก่อน +1

    I think JavaScript works somehow this way

  • @رياحالهاشمية
    @رياحالهاشمية ปีที่แล้ว

    شكرا

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

    perfect

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

      Thank you!

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

    can we do prototyping for differnt type of objects , suppose one is 'Fruit ', other is 'FruitDTO'

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

      I am not sure I got the question :(

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

      Well we're not talking about cloning in this case, its *converting* !! You have to create a convertToDto method in your fruit class to convert fruit entity to dto
      Or create a FruitConverter class (preferably a singleton) that has two methods: convertToFruitEntity & convertToFruitDto

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

      @@haithemnasri7210 thanks

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

    Weird thing is that we trying to solve copying now... when arrays have Copy function, that just utilizes copy of data (memcopy) in RAM.

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

      Hello! We are detailing and explaining the Prototype pattern as it figures in the GoF book :) Feel free to use it as you see fit!

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

    how are fields immutable when there is no final keyword there ??

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

      Hey! You may be mixing a couple Java concepts here! Please take a look at these videos: th-cam.com/video/0-41SMoV_TA/w-d-xo.html & th-cam.com/video/_drNcLWgUlE/w-d-xo.html and let me know if you still have this question :)

  • @o.fm.a5573
    @o.fm.a5573 11 หลายเดือนก่อน

    I find the code in this video extremely confusing. Im having problems relating the spoken information to the written information D:

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

      Sorry to read that! Let us know which parts were confusing so we can try and help you!

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

    what does super(car) do. time : 5:47

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

      It calls the constructor of its parent class.

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

    I didn't know that object of the same class can access the private fields of another object of the same class

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

      I am not sure I got you. Sorry!