This video shows why and when to use a the factory method design pattern and how it is different from a factory. It is the second video in a 3-part video series: Factories
C H A P T E R S
1:00 The factory method pattern puts the class instantiation in subclasses
1:30 In a dynamic language like Python, the abstract method is not needed
1:53 Let subclasses decide which class to instantiate
3:33 The factory method pattern does not help to prevent switching on types
3:56 open-closed principle violation
4:18 The benefit of the factory method pattern is abstraction
5:27 The factory method pattern helps to put code where it belongs
#factorymethod #programming #python