forked from iluwatar/java-design-patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
82 additions
and
32 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
layout: pattern | ||
title: Feature Toggle | ||
folder: feature-toggle | ||
permalink: /patterns/feature-toggle/ | ||
categories: Behavioral | ||
tags: | ||
- Java | ||
- Difficulty-Beginner | ||
--- | ||
|
||
## Also known as | ||
Feature Flag | ||
|
||
## Intent | ||
Used to switch code execution paths based on properties or groupings. Allowing new features to be released, tested | ||
and rolled out. Allowing switching back to the older feature quickly if needed. It should be noted that this pattern, | ||
can easily introduce code complexity. There is also cause for concern that the old feature that the toggle is eventually | ||
going to phase out is never removed, causing redundant code smells and increased maintainability. | ||
|
||
![alt text](./etc/feature-toggle.png "Feature Toggle") | ||
|
||
## Applicability | ||
Use the Feature Toogle pattern when | ||
|
||
* Giving different features to different users. | ||
* Rolling out a new feature incrementally. | ||
* Switching between development and production environments. | ||
|
||
## Credits | ||
|
||
* [Martin Fowler 29 October 2010 (2010-10-29).](http://martinfowler.com/bliki/FeatureToggle.html) |
6 changes: 3 additions & 3 deletions
6
feature-toggle/src/main/java/com/iluwatar/featuretoggle/App.java
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
6 changes: 3 additions & 3 deletions
6
feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/Service.java
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
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
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
6 changes: 3 additions & 3 deletions
6
feature-toggle/src/main/java/com/iluwatar/featuretoggle/user/User.java
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
6 changes: 3 additions & 3 deletions
6
feature-toggle/src/main/java/com/iluwatar/featuretoggle/user/UserGroup.java
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
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
6 changes: 3 additions & 3 deletions
6
...java/com/iluwatar/featuretoggle/pattern/tieredversion/TieredFeatureToggleVersionTest.java
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
6 changes: 3 additions & 3 deletions
6
feature-toggle/src/test/java/com/iluwatar/featuretoggle/user/UserGroupTest.java
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