You’ve come to the right place if you’re struggling with the factory pattern or wondering how to create a factory class without switching and if-else statements.

From the sheer number of StackOverflow posts regarding this, I can tell you are not alone.

I’ll drop my 2 cents on how you can implement the factory pattern without any use of code branching. I think you’ll find my approach helpful as it provides you something I couldn’t easily get an answer for back when I was a beginner.

#software-development #software-engineering #programming #technology #web-development

Factory Pattern Without Switch, This Is How It Should Be Done
1.50 GEEK