I have a requirement to implement feature toggling in my current project. I have no idea how to implement it from scratch in Java.
I have read the theory behind the feature toggling at various articles related to this topic but I haven't yet seen the implementation tutorial or documentation that describe this in detail for a beginner.
Feature Toggles are a very common agile development practices in the context of continuous deployment and delivery. The basic idea is to associate a toggle with each new feature you are working on. This allows you to enable or disable these features at application runtime, even for individual users.
Feature toggles, also known as feature flags, are components of software development that allow specific features of an application to be activated or deactivated at will. This allows developers to safely “toggle” new features on or off for testing.
I would recommend taking a look at some existing implementations to get ideas on how you want your system to behave and fits with your requirements. There is a small list at http://featureflags.io/java-feature-flags/, and poking around the web can probably find more.
In the end, you'll need to consider a few things:
Edit: From personal experience, Launch Darkly has a pretty cool approach where the clients are loaded with the rules engine for determining flag status, which makes it very fast & resilient to the hosted service going down.
Have a look at the following projects:
And there's even more listed over at Feature Flags
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With