File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
# Chapter 4: Factory patterns
2
2
3
- ## Simple Factory
3
+ ## Simple Factory 🚧
4
4
5
5
> A class which chooses which product class to instantiate and return, based upon method parameters.
6
6
@@ -12,7 +12,7 @@ and [dataclasses](https://docs.python.org/3/library/dataclasses.html#module-data
12
12
are factories for creating classes.
13
13
The Factory Boy package provides easy object creation for Django and for other ORMs.
14
14
15
- ## Factory Method
15
+ ## Factory Method 📋
16
16
17
17
> Defines an interface for creating an object, but lets subclasses decide which class to
18
18
> instantiate. The Factory method lets a class defer instantiation to subclasses.
@@ -28,14 +28,14 @@ generation and to allow extension through the creation of new factory methods wi
28
28
I took advantage of this to add a new class for the creation of 3D QR codes with my favourite NURBS modelling software
29
29
Rhino - it was super simple once I understood the pattern.
30
30
31
- ## Abstract Factory
31
+ ## Abstract Factory 🏭
32
32
33
33
> Provides an interface for creating families of related or dependent objects without specifying
34
34
> their concrete classes.
35
35
36
36
For instance the ` PizzaIngredientFactory ` abstract class defines an interface for a family of products.
37
37
38
- ## Builder 👷🏻♀️
38
+ ## Builder 👷🏻♀️🏗️
39
39
40
40
When the object creation gets more complex with a number of distinct steps then the Builder pattern comes in,
41
41
esseantially using a Template method to put all of the creation steps together.
You can’t perform that action at this time.
0 commit comments