If your children are identical twins and you introduce them to someone, how do you help that someone distinguish between the twins?
You use the factory design pattern of course!
Let’s use this post to learn one of the most commonly used design patterns in the world of object-oriented programming. Instead of compelling you to remember the names of classes, the factory pattern returns you the appropriate class based on something you know about that class. Let’s dive in to see what I mean. Continue reading “Design patterns: Factory pattern”