From the course: C#: Design Patterns Part 1
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Factory Method pattern definition - Python Tutorial
From the course: C#: Design Patterns Part 1
Factory Method pattern definition
- A factory, the place where a specific type of object is produced, the definition may seem obvious, but the clarity of the term that the pattern is named after is an important part of using design patterns. A factory method is constructing a concrete object of any type, that implements a specified interface from a method in another concrete type. This allows the use of an object without knowing the details of what it is, just knowing what it does. It goes on to decouple, a consumer of an interface from the implementation of that interface. This allows, the use of an object without knowing the details of what it is, just knowing what it does. It decouples a consumer of an interface from the implementation of that interface. It also makes it possible to defer the creation of that object so that the type of returned object can depend on the running applications context. The factory method is another one of the most commonly used…
Contents
-
-
-
-
-
-
(Locked)
Factory Method pattern definition5m 3s
-
(Locked)
Factory Method pattern to choose the implementation of an action dynamically4m 26s
-
(Locked)
Factory Method design pattern for unit testing6m 5s
-
(Locked)
Challenge: Factory Method with dependency injection1m 37s
-
(Locked)
Solution: Factory Method with dependency injection3m 18s
-
(Locked)
-
-