ff4j / ff4j

Feature Flags for Java made easy
http://ff4j.org
Apache License 2.0
1.38k stars 276 forks source link

Showing an alert message while toggling any feature & Removing FF4J_TABLES if not used by the application. #466

Open parul7802 opened 4 years ago

parul7802 commented 4 years ago

@clun I am using FF4J for implementing Feature Toggle for my Team's application.

While working on it I found some features we can add to make it more user friendly & have few questions as well.

paskos commented 4 years ago

I second :) We plan to use FF4J to toggle on-off and/or A/B test features in video games played by a large number of players. It would be very nice to force confirmation of feature state changes to avoid accidentally turning features on or off and the associated impact on game play experience for a large player base.

clun commented 4 years ago

I agree.

I would add a more generic behaviour here.

I will add a Map<String, String> at ff4j class level where you can ADD keys (not enforcing keys with enum to allow you add what you need. I would need to update the settings screen)

ff4j.getCustomKeys().put("WHEN_TOGGLING_FEATURE_ASK_FOR_CONFIRMATION", true);
ff4j.getCustomKeys().put("WHEN_TOGGLING_FEATURE_PROVIDE_COMMENT", true);
ff4j.getCustomKeys().put("WHEN_DELETING_FEATURE_ASK_FOR_CONFIRMATION", true);
ff4j.getCustomKeys().put("WHEN_DELETING_PROPERTY_ASK_FOR_CONFIRMATION", true);
clun commented 4 years ago

At framework level we cannot easily remove the ROLES_TABLE as it is used a lot in JdbcFeatureStore for both read and write. Even if you don't define ROLE yourself you can allow a population of user to use your very own feature.

Nevertheless to drop this table you would have to extend the class JdbcFeatureStore and change the code where is it used. As it is localized in a single class this is doable and this class does not really change for a few releases now.

parul7802 commented 3 years ago

Yep agreed @paskos . Thanks @clun