1.

What is the Prototype Design Pattern?

Answer»

The Prototype Pattern creates new objects, but instead of returning uninitialized objects, it RETURNS objects with values copied from a prototype - or sample - object. The Properties pattern is another name for the Prototype pattern.

The initialization of business objects with values that match the database's default settings is an EXAMPLE of where the Prototype pattern comes in handy. The default values from the prototype object are replicated into a NEWLY generated business object.

The Prototype pattern is rarely used in traditional languages, but JAVASCRIPT, as a prototypal language, employs it in the creation of new objects and prototypes.



Discussion

No Comment Found