Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Existing PHP Tool for Feature Toggle

Recently I've read a number of articles talking about the idea of using "feature toggles" or "gatekeepers" to keep features hidden from users until the development is done. Facebook and Flickr both also talk about how they use this to test new features with a subset of users before unleashing them on everyone.

A bit of googling didn't turn up any existing PHP packages/tools that can be added to a web app to handle this type of thing. It seems straight forward enough to roll our own but no reason to re-invent that wheel if we don't need to. Are there any existing PHP tools to do this?

Articles

  • Feature Toggle by Martin Fowler
  • Flipping Out on Flickr DevBlog

Clarification: The part of this that I'm looking to see if it exists is the admin panel that controls which users can see the new features. In Flickr's example, they can turn it on based on the host. In the Facebook example, they add functionality such as limiting a feature to 5% of users, only TechCrunch users or only East coast users.

The admin panel seems crucial when you have 200 turned on features, 10 features that aren't quite done yet and 3 more that you're demoing for some users.

like image 464
Jonathan Campbell Avatar asked Aug 22 '11 21:08

Jonathan Campbell


2 Answers

I've wrote a micro service for feature toggle pattern, called Bipolar:

https://marinho.github.io/bipolar-server

It is written in Python but that doesn't matter because it is an external API and Admin interface, so, all you need is to write a PHP client for it. We have used it in production for a while but only worked on public release and documentation recently. For JavaScript support it can push notifications using Webhooks as a basic URL call or via Pusher event.

I am bit missed after many years with no contact with PHP, but I can help you to write the client if you are interested.

I hope that can be helpful.

like image 25
Marinho Brandão Avatar answered Oct 11 '22 14:10

Marinho Brandão


if (user_can_see_app()) {
    show_app();
} else {
    dont_show_app();
}

I fail to see why a package would be required for something so simple.

like image 58
Marc B Avatar answered Oct 11 '22 15:10

Marc B