Month: May 2023

The Factory Pattern

May 17, 2023
The factory design pattern solves one big issue – your clients having to know about all the different concrete class types that they may need to instantiate. Or to put it another way your clients just tell the factory what they need built and the factory returns an instance of the required class. We explain this in more detail below and/or you can watch this video. The Problem We're Solving Say you have a client application or class. In our example it's a simple console application. This console app is responsible for taking input from the user and then instantiating another class based on that input. The input provided creates an instance of ONE class from a range of similar...
Read more...