Skip to content

Commit 6090d6b

Browse files
committed
Deploying to gh-pages from @ 982dab6 🚀
1 parent 6634b45 commit 6090d6b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,6 +1051,7 @@ <h3 id="memoization">Memoization</h3>
10511051
<h1 id="design-patterns">Design Patterns</h1>
10521052
<h2 id="decorator">Decorator</h2>
10531053
<p><a href="https://addyosmani.com/resources/essentialjsdesignpatterns/book/#decoratorpatternjavascript">Decorator</a></p>
1054+
<p><a href="https://www.scaler.com/topics/design-patterns/decorator-design-pattern/">https://www.scaler.com/topics/design-patterns/decorator-design-pattern/</a></p>
10541055
<p>Decorators are a structural design pattern that aim to promote code re-use. Similar to Mixins, they can be considered another viable alternative to object sub-classing.</p>
10551056
<p>Classically, Decorators offered the ability to add behaviour to existing classes in a system dynamically. The idea was that the <em>decoration</em> itself wasn&#39;t essential to the base functionality of the class, otherwise it would be baked into the <em>superclass</em> itself.</p>
10561057
<p>They can be used to modify existing systems where we wish to add additional features to objects without the need to heavily modify the underlying code using them. A common reason why developers use them is their applications may contain features requiring a large quantity of distinct types of object. Imagine having to define hundreds of different object constructors for say, a JavaScript game.</p>

0 commit comments

Comments
 (0)