Skip to content

Instantly share code, notes, and snippets.

@gibron
Created September 26, 2018 23:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gibron/3decb0ba3fc6e7088d3aabb6374a1fc8 to your computer and use it in GitHub Desktop.
Save gibron/3decb0ba3fc6e7088d3aabb6374a1fc8 to your computer and use it in GitHub Desktop.
these releate more to a picture of a solution and not so much exact requirements of a tool
Toggle =~ Feature Flag
• Would like a schema/common pattern for Toggle
• Ability to enable or disable Toggles without requiring software deployment
• Ability to list Toggles with values to audit a User, Group, or Org
• "Works with IMS"
• Through a UI, an administrative user can configure access to features at a user or group of users level
• Native support for feature management on client-side (JavaScript) and server-side (Java/~Scala, Node support)
• Would need to work for localdev
• Not forced into a "scopes" pattern but instead be able to construct a featureDecisions indirection [1]
featureDecisions.js
function createFeatureDecisions(features){
return {
includeOrderCancellationInEmail(){
return features.isEnabled("next-gen-ecomm");
}
// ... additional decision functions also live here ...
};
}
invoiceEmailer.js
const features = fetchFeatureTogglesFromSomewhere();
const featureDecisions = createFeatureDecisions(features);
function generateInvoiceEmail(){
const baseEmail = buildEmailForInvoice(this.invoice);
if( featureDecisions.includeOrderCancellationInEmail() ){
return addOrderCancellationContentToEmail(baseEmail);
}else{
return baseEmail;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment