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

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

If you are trying to copy a certain object in your application, you may come up with several techniques to do that, but trust me when I tell you that the proven and most efficient way to do it is via the Prototype Pattern, which is detailed and implemented in this video.

Timestamps:
00:00 Introduction
00:28 What is the Prototype Pattern?
02:21 Prototype Pattern Class Diagram
03:14 Prototype Pattern Implementation
05:18 Shallow vs Deep Copy
06:16 Prototype Registry
07:11 Recap
07:33 Thanks for Watching!

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

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

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 <3

animeu
Автор

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.

The_Ashwatthama
Автор

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()

tulasidamarla
Автор

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

empathetic
Автор

Deep, precise, and clear explanation. Thank you

architectureflashlight
Автор

nice explanation and video! but I have a question, isn't this violating the single responsability principle? now the object has the responsability it is originally intented to do, but it is also responsable of generating clones of itself?

luisleal
Автор

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

o.fm.a
Автор

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???

yatri
Автор

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

deepkiran
Автор

Thanks u, you saved my life <3 <3 <3 <3

miaougrrpaw
Автор

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

TechOnScreen
Автор

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

dadlord
Автор

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

Matelight_Repetition
Автор

I think JavaScript works somehow this way

johantchassem