Software development and continuous delivery bring lots of challenges to every aspect of the organization. Starting from Scrum Master, Product Owner and most important developers. It is not possible to deliver every feature end of the sprint. There may be a dependency, issues or any unrelated issues.
There are lots of Feature Toggle open source development and other libraries are available. each and everyone has effective contribution and merit associated with it. In development, there are a number of programming languages which requires feature toggles, along with YAML, properties and other means of getting runtime configuration information. Feature Toggle should be used in all aspect of delivery.
What is a feature toggle?
Feature Toggle allows avoiding branching and reduces merge conflicts. I will discuss the importance of it in the near future. Martin Fowler has written very good articles along with patterns on the subject.
In this article, we will talk about the basic elements of describing feature toggle in the software development. The idea here is to provide default code execution and alternate code execution which depends on the feature at runtime execution of the code.
How many ways feature toggle can be set?
There is a number of ways one can set feature toggle as follows:
1) On command-line parameters
2) Through DB Services
3) Admin Console
4) Rest API
5) Simply providing a flag within the code
In my future articles, I will be covering all the topics but here for the sake of completeness, I will provide the basic functionality required by the developer.
A Simple Inline Code based Feature Toggle
var X_FEATURE_TOGGLE = TRUE;
Somewhere in the code:
if ( X_FEATURE_TOGGLE) {
//Please execute feature related code here
} else {
//Please execute default code her.
}
This is a very sample which can be applied in any programming languages. This example will not let you change at run time. But described here for simplicity. With a simple modification, the same example can be used for compile-time changes and maybe by adding more functionality, can be done at runtime.
I will be covering a series in the next few months. Watch the space!
Please visit the number of commercial products using Feature Toggle functionality.
Assessment Management Software
Multiple Choice Question Software