4
25
329
18K
278
Download Image
@theskilledcoder finally escaping that one giant `switch` statement that creates all the objects 🔥
@theskilledcoder Clean breakdown 👌 Factory Pattern really shines when adding new types without touching existing code. Saved me from a lot of if-else mess before.
@theskilledcoder Nice 👍 it's just a way of getting away with if else cases. You anyways can't predict extensions on an feature, it's something more controlled by the business than engineers. But thanks for sharing!