Feature toggles can be used for several reasons. They can be used to avoid branching (for some people that is important), test things in production, A/B testing, a safety net or to enhance the experience for certain customers. Regardless of what the reason is the basics are the same.
And that is why you should read this comprehensive article describing different kinds of feature toggles and how to (not) implement them so that your code does not become a mess. The TL/DR of that article is that some feature toggles tend to live for much longer than most people expect which is why both static configuration controlled through source and deployments are desirable as well as an implementation that will not end up being a mess. Hence if-statements for each toggle is probably a bad idea..
Anyway go over there and read now. You won't regret it!
Post a Comment