Carl Danley

The Prototype Pattern

The prototype pattern focuses on creating an object that can be used as a blueprint for other objects through prototypal inheritance. This pattern is inherently easy to work with in JavaScript because of the native support for prototypal inheritance in JS which means we don't need to spend time or effort imitating this topology.

This article is part of a series called JavaScript Design Patterns.

Advantages

Disadvantages

Example

Additional Resources

http://www.uipress.com/patterns-in-javascript-the-prototype-pattern/#.Uh9GQmRgYWA
http://www.geraintwilliams.net/2013/03/javascript-design-patterns.html
http://addyosmani.com/resources/essentialjsdesignpatterns/book/#prototypepatternjavascript

Other Common JS Patterns

The Module Pattern
The Revealing Module Pattern
The Singleton Pattern
The Observer Pattern
The Mediator Pattern
The Prototype Pattern
The Facade Pattern
The Factory Pattern