Togglz

What is it about?

Togglz is an implementation of the Feature Toggles pattern for Java. Feature Toggles are a very common agile development practices in the context of continuous deployment and delivery. The basic idea is to associate a toggle with each new feature you are working on. This allows you to enable or disable these features at application runtime, even for individual users.

Want to learn more? Have a look at an usage example or check the quickstart guide.

News

30-Jul-2016
Togglz 2.3.0.Final released
We are very proud to announce the release of Togglz 2.3.0.Final. Thanks to everyone who helped to get this release out. You can learn more about the latest changes on the what's new page. Also have a look at the updating notes for important changes since 2.2.0.Final. Enjoy!
17-Jun-2016
Togglz 2.3.0.RC2 released
We are happy to announce the release of Togglz 2.3.0.RC2. This new version adds some major new features which have been contributed by the community. See the what's new page for all details. We are planning to release Togglz 2.3.0.Final very soon. So please give RC2 a try and report every problem you run into. The simplest way to contact us is to use the new Gitter chat room. Please let us know what you think!
21-Feb-2016
Togglz 2.3.0.RC1 released
I'm very proud to announce the release of Togglz 2.3.0.RC1. This release includes many cool new features like the Spring Boot Starter and the Hazelcast integration. We decided to release RC1 first to give people the chance to test the new modules and to provide feedback. Have a look at the what's new page for a summary of all changes and the updating notes for important changes since 2.2.0.Final. Enjoy!
28-Jul-2015
Togglz 2.2.0.Final released
I'm very proud to announce the release of Togglz 2.2.0.Final. This release includes many exciting new features like the new Archaius and Cassandra modules. Have a look at the what's new page for a summary of all changes. If you are upgrading from 2.1.0.Final, have a look at the updating notes, especially if you are using the Spring integration module. Enjoy!
16-Dez-2014
Togglz 2.1.0.Final released

We are happy to announce the release of Togglz 2.1.0.Final. This new version ships with various improvements and new features. Special thanks to Fábio Franco Uechi for his help on the AppEngine and Guice modules. Have a look at the what's new for details!

Why should you choose Togglz?

Because Togglz...

  • allows you to declare your features using a regular Java enum type.
  • is configured in a type-safe way by implementing a single interface.
  • provides integration with popular frameworks like CDI, Spring, JSF, etc.
  • supports different backends for storing toggle states (JDBC database, Java property files, etc)
  • can be integrated with your user identity management which allows to enable features only for specific users.
  • integrates with common security frameworks like JAAS, Spring Security, Seam Security and Apache Shiro.
  • supports complex application packaging scenarios like EARs, skinny WARs, etc.
  • ships with an embedded web-based admin console to manage feature states.

Example

Features are declared using a regular Java enum type:

public enum MyFeatures implements Feature {

    @Label("First Feature")
    FEATURE_ONE,

    @Label("Second Feature")
    FEATURE_TWO;

    public boolean isActive() {
        return FeatureContext.getFeatureManager().isActive(this);
    }

}

Checking whether a specific feature is enabled for the current user is very simple. Just call the isActive() method on the feature.

public void someBusinessMethod() {

  if( MyFeatures.FEATURE_ONE.isActive() ) {
    // do new exciting stuff here
  }

  [...]

}

You can find more details in the quickstart guide.