gwtgwt-platformfeaturetoggle

Feature-Toggle with GWTP


As you may know, Feature-Toggle is a method to deploy features that are not fully ready, and turn them on by using some configuration. Features can be turned on for specific customers (A/B testing for example) or gradually for all customers when ready.

I wonder if anyone have an idea how to do it nicely in GWTP. I thought that feature-toggle can be done in two ways (two scope-levels): - Using deferred binding mechanism: replace implementation of required classes for a specific deployment (presenter-scope). - Using different application pages - implement your own PlaceManager and navigate to different places containing the new features for a specific deployment (place-scope).

I assume that finer scopes (some features within a presenter, for example) should be controlled via "if-else".

In order to decide which features are turned on, I want to use some kind of configuration (controlled maybe by a maven profile). Is there a way to add custom configuration elements to the gwt.xml module configuration?

Any other idea how to implement feature-toggle? Does someone have any experience with this method?

Thanks!


Solution

  • Both methods you suggested will work.

    We have chose to implement feature toggle on a presenter level, using gin and deferred binding. we have two gin modules (lets call them A and B), and we install the proper one by using the deferred binding mechanism to create a property which we check.

    another approach will be to add GateKeeper classes (GateKeeperA, GateKeeperB) that you can assign to the relevant presenters and switch using gin/deferred binding. those will implement the logic to allow/prevent access to the toggled features on the client side).