Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Feature Toggling Explained with Qandidate’s Toggle
Dec 15, 2015 @ 11:49:57

The SitePoint PHP blog has posted a tutorial showing you how to use the Toggle library from Qandidate to handle the enabling and disabling of features in your application.

A frequently used development workflow in version control systems is feature branching. The idea is that we develop new features in branches other than the master one. After a feature is tested and ready to be released, it is merged back into the master branch or a release branch for deployment. This approach helps us develop new features without disturbing the main code base.

However, developing a feature branch might take much longer than a normal release cycle. [...] One of the techniques widely used as an alternative to feature branching is feature toggling. Feature toggles (or feature flippers) act like on/off switches. [...] We can temporarily hide a partially built or risky feature (release toggles) or limit finished stable features to a certain group of users (business toggles).

They introduce the basics of the Toggle library and it's main components: the Manager, Toggles, Operators, Conditions and Context. These are all combined together to help determine if a feature should be enabled or hidden. Examples of each are included along the way as well as one showing a toggle in action. They also show how to integrate it with a framework, in this case a Laravel project as middleware. The post ends with a look at strategies, giving you even more customization around the conditions of the toggle (example: Affirmative, Majority and Unanimous), statues and creating the conditions from either YAML or array configurations.

tagged: feature toggle flag qandidate library tutorial introduction functionality

Link: http://www.sitepoint.com/feature-toggling-explained-with-qandidates-toggle/