Skip to content

Commit 6d900c5

Browse files
committed
updates
1 parent 0847ab6 commit 6d900c5

File tree

4 files changed

+16
-40
lines changed

4 files changed

+16
-40
lines changed

abstract_factory/README.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
## Videos
44

5-
Section | Video Link
5+
Section | Video Links
66
-|-
7-
Overview | <a id="ytVideoLink" href="https://youtu.be/eXNLpSQjCzU" target="_blank" title="Overview"><img src="/img/yt_btn_sm.gif" alt="Overview"/></a>
8-
Example Use Case | <a id="ytVideoLink" href="https://youtu.be/H18COAHTdVs" target="_blank" title="Use Case"><img src="/img/yt_btn_sm.gif" alt="Use Case"/></a>
9-
Exception Handling | <a id="ytVideoLink" href="https://youtu.be/jOxJSA3sxcQ" target="_blank" title="ABCMeta"><img src="/img/yt_btn_sm.gif" alt="Exception Handling"/></a>
7+
Abstract Factory Overview | <a id="udemyVideoLink" href="https://www.udemy.com/course/design-patterns-in-python/learn/lecture/16396782/?referralCode=7493DBBBF97FF2B0D24D" target="_blank" title="Abstract Factory Overview"><img src="/img/udemy_btn_sm.gif" alt="Abstract Factory Overview"/></a>&nbsp;<a id="ytVideoLink" href="https://youtu.be/eXNLpSQjCzU" target="_blank" title="Abstract Factory Overview"><img src="/img/yt_btn_sm.gif" alt="Abstract Factory Overview"/></a>&nbsp;<a id="skillShareVideoLink" href="https://skl.sh/34SM2Xg" target="_blank" title="Abstract Factory Overview"><img src="/img/skillshare_btn_sm.gif" alt="Abstract Factory Overview"/></a>
8+
Abstract Factory Use Case | <a id="udemyVideoLink" href="https://www.udemy.com/course/design-patterns-in-python/learn/lecture/25362118/?referralCode=7493DBBBF97FF2B0D24D" target="_blank" title="Abstract Factory Use Case"><img src="/img/udemy_btn_sm.gif" alt="Abstract Factory Use Case"/></a>&nbsp;<a id="ytVideoLink" href="https://youtu.be/H18COAHTdVs" target="_blank" title="Abstract Factory Use Case"><img src="/img/yt_btn_sm.gif" alt="Abstract Factory Use Case"/></a>&nbsp;<a id="skillShareVideoLink" href="https://skl.sh/34SM2Xg" target="_blank" title="Abstract Factory Use Case"><img src="/img/skillshare_btn_sm.gif" alt="Abstract Factory Use Case"/></a>
9+
Exception Handling | <a id="udemyVideoLink" href="https://www.udemy.com/course/design-patterns-in-python/learn/lecture/25362160/?referralCode=7493DBBBF97FF2B0D24D" target="_blank" title="Exception Handling"><img src="/img/udemy_btn_sm.gif" alt="Exception Handling"/></a>&nbsp;<a id="ytVideoLink" href="https://youtu.be/jOxJSA3sxcQ" target="_blank" title="Exception Handling"><img src="/img/yt_btn_sm.gif" alt="Exception Handling"/></a>&nbsp;<a id="skillShareVideoLink" href="https://skl.sh/34SM2Xg" target="_blank" title="Exception Handling"><img src="/img/skillshare_btn_sm.gif" alt="Exception Handling"/></a>
1010

1111
## Book
1212

@@ -127,12 +127,3 @@ You can add exception handling for as many types of errors as you wish.
127127

128128
Python Errors and Exceptions : [https://docs.python.org/3/tutorial/errors.html](https://docs.python.org/3/tutorial/errors.html)
129129

130-
## Summary
131-
132-
* Use when you want to provide a library of relatively similar products from multiple different factories.
133-
* You want the system to be independent of how the products are created.
134-
* It fulfills all of the same use cases as the Factory method, but is a factory for creational pattern type methods.
135-
* The client implements the abstract factory interface, rather than all the internal logic and Factories. This allows the possibility of creating a library that can be imported for using the Abstract Factory.
136-
* The Abstract Factory defers the creation of the final products/objects to its concrete factory subclasses.
137-
* You want to enforce consistent interfaces across products.
138-
* You want the possibility to exchange product families.

builder/README.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
## Videos
44

5-
Section | Video Link
5+
Section | Video Links
66
-|-
7-
Overview | <a id="ytVideoLink" href="https://youtu.be/pMadA6F4zGU" target="_blank" title="Overview"><img src="/img/yt_btn_sm.gif" alt="Overview"/></a>
8-
Example Use Case | <a id="ytVideoLink" href="https://youtu.be/xvwOwCNxIXM" target="_blank" title="Use Case"><img src="/img/yt_btn_sm.gif" alt="Use Case"/></a>
9-
Lists | <a id="ytVideoLink" href="https://youtu.be/54jpHGmHlHQ" target="_blank" title="Lists"><img src="/img/yt_btn_sm.gif" alt="Lists"/></a>
7+
Builder Overview | <a id="udemyVideoLink" href="https://www.udemy.com/course/design-patterns-in-python/learn/lecture/16396852/?referralCode=7493DBBBF97FF2B0D24D" target="_blank" title="Builder Overview"><img src="/img/udemy_btn_sm.gif" alt="Builder Overview"/></a>&nbsp;<a id="ytVideoLink" href="https://youtu.be/pMadA6F4zGU" target="_blank" title="Builder Overview"><img src="/img/yt_btn_sm.gif" alt="Builder Overview"/></a>&nbsp;<a id="skillShareVideoLink" href="https://skl.sh/34SM2Xg" target="_blank" title="Builder Overview"><img src="/img/skillshare_btn_sm.gif" alt="Builder Overview"/></a>
8+
Builder Use Case | <a id="udemyVideoLink" href="https://www.udemy.com/course/design-patterns-in-python/learn/lecture/25362124/?referralCode=7493DBBBF97FF2B0D24D" target="_blank" title="Builder Use Case"><img src="/img/udemy_btn_sm.gif" alt="Builder Use Case"/></a>&nbsp;<a id="ytVideoLink" href="https://youtu.be/xvwOwCNxIXM" target="_blank" title="Builder Use Case"><img src="/img/yt_btn_sm.gif" alt="Builder Use Case"/></a>&nbsp;<a id="skillShareVideoLink" href="https://skl.sh/34SM2Xg" target="_blank" title="Builder Use Case"><img src="/img/skillshare_btn_sm.gif" alt="Builder Use Case"/></a>
9+
Python **List** | <a id="udemyVideoLink" href="https://www.udemy.com/course/design-patterns-in-python/learn/lecture/25362168/?referralCode=7493DBBBF97FF2B0D24D" target="_blank" title="Python List"><img src="/img/udemy_btn_sm.gif" alt="Python List"/></a>&nbsp;<a id="ytVideoLink" href="https://youtu.be/54jpHGmHlHQ" target="_blank" title="Python List"><img src="/img/yt_btn_sm.gif" alt="Python List"/></a>&nbsp;<a id="skillShareVideoLink" href="https://skl.sh/34SM2Xg" target="_blank" title="Python List"><img src="/img/skillshare_btn_sm.gif" alt="Python List"/></a>
1010

1111
## Book
1212

@@ -128,10 +128,3 @@ if furniture in ['SmallChair', 'MediumChair', 'BigChair']:
128128
```
129129

130130
This line, creates a list at runtime including the strings 'SmallChair', 'MediumChair' and 'BigChair'. If the value in `furniture` equals the same string as one of those items in the list, then the condition is true and the code within the if statement block will execute.
131-
132-
## Summary
133-
134-
* The Builder pattern is a creational pattern that is used to create more complex objects than you'd expect from a factory.
135-
* The Builder pattern should be able to construct complex objects in any order and include/exclude whichever available components it likes.
136-
* For different combinations of products than can be returned from a Builder, use a specific Director to create the bespoke combination.
137-
* You can use an [Abstract Factory](/abstract_factory) to add an abstraction between the client and Director.

prototype/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
## Videos
44

5-
Section | Video Link
5+
Section | Video Links
66
-|-
7-
Overview | <a id="ytVideoLink" href="https://youtu.be/2tFv9Rf2XGg" target="_blank" title="Overview"><img src="/img/yt_btn_sm.gif" alt="Overview"/></a>
8-
Example Use Case | <a id="ytVideoLink" href="https://youtu.be/kiMgCLXckU0" target="_blank" title="Use Case"><img src="/img/yt_btn_sm.gif" alt="Use Case"/></a>
9-
id() function | <a id="ytVideoLink" href="https://youtu.be/tgbGqu3OQD8" target="_blank" title="python id function"><img src="/img/yt_btn_sm.gif" alt="python id function"/></a>
7+
Prototype Overview | <a id="udemyVideoLink" href="https://www.udemy.com/course/design-patterns-in-python/learn/lecture/16396926/?referralCode=7493DBBBF97FF2B0D24D" target="_blank" title="Prototype Overview"><img src="/img/udemy_btn_sm.gif" alt="Prototype Overview"/></a>&nbsp;<a id="ytVideoLink" href="https://youtu.be/2tFv9Rf2XGg" target="_blank" title="Prototype Overview"><img src="/img/yt_btn_sm.gif" alt="Prototype Overview"/></a>&nbsp;<a id="skillShareVideoLink" href="https://skl.sh/34SM2Xg" target="_blank" title="Prototype Overview"><img src="/img/skillshare_btn_sm.gif" alt="Prototype Overview"/></a>
8+
Prototype Use Case | <a id="udemyVideoLink" href="https://www.udemy.com/course/design-patterns-in-python/learn/lecture/25362134/?referralCode=7493DBBBF97FF2B0D24D" target="_blank" title="Prototype Use Case"><img src="/img/udemy_btn_sm.gif" alt="Prototype Use Case"/></a>&nbsp;<a id="ytVideoLink" href="https://youtu.be/kiMgCLXckU0" target="_blank" title="Prototype Use Case"><img src="/img/yt_btn_sm.gif" alt="Prototype Use Case"/></a>&nbsp;<a id="skillShareVideoLink" href="https://skl.sh/34SM2Xg" target="_blank" title="Prototype Use Case"><img src="/img/skillshare_btn_sm.gif" alt="Prototype Use Case"/></a>
9+
Python **id()** function | <a id="udemyVideoLink" href="https://www.udemy.com/course/design-patterns-in-python/learn/lecture/25362172/?referralCode=7493DBBBF97FF2B0D24D" target="_blank" title="python id function"><img src="/img/udemy_btn_sm.gif" alt="python id function"/></a>&nbsp;<a id="ytVideoLink" href="https://youtu.be/tgbGqu3OQD8" target="_blank" title="python id function"><img src="/img/yt_btn_sm.gif" alt="python id function"/></a>&nbsp;<a id="skillShareVideoLink" href="https://skl.sh/34SM2Xg" target="_blank" title="python id function"><img src="/img/skillshare_btn_sm.gif" alt="python id function"/></a>
1010

1111
## Book
1212

singleton/README.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
## Videos
44

5-
Section | Video Link
5+
Section | Video Links
66
-|-
7-
Overview | <a id="ytVideoLink" href="https://youtu.be/wc1b70LueGA" target="_blank" title="Overview"><img src="/img/yt_btn_sm.gif" alt="Overview"/></a>
8-
Example Use Case | <a id="ytVideoLink" href="https://youtu.be/-F7OYXMpVJw" target="_blank" title="Use Case"><img src="/img/yt_btn_sm.gif" alt="Use Case"/></a>
9-
Dictionary | <a id="ytVideoLink" href="https://youtu.be/L7IPuo6VOjo" target="_blank" title="Dictionary"><img src="/img/yt_btn_sm.gif" alt="Dictionary"/></a>
7+
Singleton Overview | <a id="udemyVideoLink" href="https://www.udemy.com/course/design-patterns-in-python/learn/lecture/25362178/?referralCode=7493DBBBF97FF2B0D24D" target="_blank" title="Singleton Overview"><img src="/img/udemy_btn_sm.gif" alt="Singleton Overview"/></a>&nbsp;<a id="ytVideoLink" href="https://youtu.be/wc1b70LueGA" target="_blank" title="Singleton Overview"><img src="/img/yt_btn_sm.gif" alt="Singleton Overview"/></a>&nbsp;<a id="skillShareVideoLink" href="https://skl.sh/34SM2Xg" target="_blank" title="Singleton Overview"><img src="/img/skillshare_btn_sm.gif" alt="Singleton Overview"/></a>
8+
Singleton Use Case | <a id="udemyVideoLink" href="https://www.udemy.com/course/design-patterns-in-python/learn/lecture/25362182/?referralCode=7493DBBBF97FF2B0D24D" target="_blank" title="Singleton Use Case"><img src="/img/udemy_btn_sm.gif" alt="Singleton Use Case"/></a>&nbsp;<a id="ytVideoLink" href="https://youtu.be/-F7OYXMpVJw" target="_blank" title="Singleton Use Case"><img src="/img/yt_btn_sm.gif" alt="Singleton Use Case"/></a>&nbsp;<a id="skillShareVideoLink" href="https://skl.sh/34SM2Xg" target="_blank" title="Singleton Use Case"><img src="/img/skillshare_btn_sm.gif" alt="Singleton Use Case"/></a>
9+
Python **Dictionary** | <a id="udemyVideoLink" href="https://www.udemy.com/course/design-patterns-in-python/learn/lecture/25362192/?referralCode=7493DBBBF97FF2B0D24D" target="_blank" title="Python Dictionary"><img src="/img/udemy_btn_sm.gif" alt="Python Dictionary"/></a>&nbsp;<a id="ytVideoLink" href="https://youtu.be/L7IPuo6VOjo" target="_blank" title="Python Dictionary"><img src="/img/yt_btn_sm.gif" alt="Python Dictionary"/></a>&nbsp;<a id="skillShareVideoLink" href="https://skl.sh/34SM2Xg" target="_blank" title="Python Dictionary"><img src="/img/skillshare_btn_sm.gif" alt="Python Dictionary"/></a>
1010

1111
## Book
1212

@@ -154,11 +154,3 @@ PS> python
154154
>>> dict(sorted(items.items()))
155155
{'abc': 123, 'def': 456, 'ghi': 789}
156156
```
157-
158-
## Summary
159-
160-
* To be a Singleton, there must only be one copy of the Singleton, no matter how many times, or in which class it was instantiated.
161-
* You want the attributes or methods to be globally accessible across your application, so that other classes may be able to use the Singleton.
162-
* You can use Singletons in other classes, as I did with the leaderboard, and they will all use the same Singleton regardless.
163-
* You want controlled access to a sole instance.
164-
* For a class to act as a singleton, it should not contain any references to `self`.

0 commit comments

Comments
 (0)