2

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!

Ian Ringrose
  • 51,220
  • 55
  • 213
  • 317
Ben Bracha
  • 1,377
  • 2
  • 15
  • 28

1 Answers1

1

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).

Shuky Capon
  • 785
  • 5
  • 22
  • How did you managed the feature-toggle configuration? I would like to keep some configuration file for that, but how can I use it from the deferred binding configuration? Or you did everything in code...? – Ben Bracha Aug 02 '12 at 10:22
  • We simply code, but if you have the time you can write a code generator that will take the settings from an XML file or something. – Shuky Capon Aug 06 '12 at 14:03