added Property pattern
This commit is contained in:
14
README.md
14
README.md
@ -15,8 +15,9 @@ Creational design patterns abstract the instantiation process. They help make a
|
||||
* [Builder](#builder)
|
||||
* [Factory Method](#factory-method)
|
||||
* [Prototype](#prototype)
|
||||
* [Property](#property)
|
||||
* [Singleton](#singleton)
|
||||
|
||||
|
||||
### Structural Patterns
|
||||
|
||||
Structural patterns are concerned with how classes and objects are composed to form larger structures.
|
||||
@ -433,6 +434,17 @@ Behavioral patterns are concerned with algorithms and the assignment of responsi
|
||||
**Applicability:** Use the Execute Around idiom when
|
||||
* You use an API that requires methods to be called in pairs such as open/close or allocate/deallocate.
|
||||
|
||||
## <a name="property">Property</a> [↑](#list-of-design-patterns)
|
||||
**Intent:** Create hierarchy of objects and new objects using already existing objects as parents.
|
||||
|
||||

|
||||
|
||||
**Applicability:** Use the Property pattern when
|
||||
* when you like to have objects with dynamic set of fields and prototype inheritance
|
||||
|
||||
**Real world examples:**
|
||||
* [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain) prototype inheritance
|
||||
|
||||
# Frequently asked questions
|
||||
|
||||
**<a id="Q1">Q: What is the difference between State and Strategy patterns?</a>**
|
||||
|
Reference in New Issue
Block a user