Created
September 26, 2018 23:02
-
-
Save gibron/3decb0ba3fc6e7088d3aabb6374a1fc8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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