What you call “horrible” I call simple to implement and comprehend. If-Else is not the devil. I’m not saying I haven’t used patterns like the one suggested here, but oftentimes, especially with a large number of teams in an ever changing environment, I’ve found a good old fashioned if-else to be the simplest solution. In the end whatever works for you and your organization is the best.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store