December 2015
Beginner to intermediate
195 pages
2h 52m
English
![]()
GoF Definition: Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.
The prototype pattern provides an alternative method for instantiating new objects by copying or cloning an instance of an existing one. Creating a new instance, in a real-world scenario, is normally treated as an expensive operation. This pattern helps us to deal with this issue. Our focus here is to reduce the expense of this creational process of a new instance.
Suppose we have a master copy of a valuable document. We want to make some change to it to ...
Read now
Unlock full access