Professional Documents
Culture Documents
Prototype What Is It?
Prototype What Is It?
What is it?
The prototype pattern is from GoF Family. It allows multiple inheritance on
platforms that don't natively support such things.
avoid subclasses of an object creator in the client application, like the abstract factory
pattern does.
avoid the inherent cost of creating a new object in the standard way (e.g., using the 'new'
keyword) when it is prohibitively expensive for a given application.
Drawbacks
Drawback to using the Prototype is that making a copy of an object can sometimes be complicated.
Example applications?
There are many practical scenarios where this design pattern really helps. Here follows few of them.