afterburner.fx

afterburner.fx is a minimalistic (3 classes) JavaFX MVP framework based on Convention over Configuration and Dependency Injection.

License: Apache 2.0

Goals:

  1. High productivity with WYSIWYG editor inclusion
  2. No boilerplate code
  3. Highest possible non-intrusion
  4. No external libraries or dependencies
  5. Maven 3 build support

Igniting JavaFX Applications

Introduction to afterburner.fx

Building a component from scratch

JavaFX with CoC, DI and Scene Builder

Behind the Scenes: Opinionated JavaFX @virtualjug

afterburner.fx provides:

  1. “Zero-Configuration” javax.inject.Inject DI of models or services into presenters.
  2. Convention-based unification of presenter, view, FXML and css.
  3. Conventional resource bundle loading.
  4. Injection of System.getProperties.
  5. Injection of presenter-local configuration properties (system properties are overriding the local configuration).
  6. Afterburner is a “Just-Enough-Framework” extracted from airhacks-control and used in airpad, lightfish and floyd applications

Jumpstart with:

mvn archetype:generate -Dfilter=com.airhacks:igniter

Afterburner is also available from maven central:

                    
        <dependency>
            <groupId>com.airhacks</groupId>
            <artifactId>afterburner.fx</artifactId>
            <version>1.6.0</version>
        </dependency>
                    
                
The current development version is available as snapshot:


        <dependency>
            <groupId>com.airhacks</groupId>
            <artifactId>afterburner.fx</artifactId>
            <version>1.6.1-SNAPSHOT</version>
        </dependency>

Simplistic example: https://github.com/AdamBien/followme.fx

Sample:

                
import com.airhacks.afterburner.views.FXMLView;

public class NoteListView extends FXMLView {
    //usually nothing to do, FXML and CSS are automatically
    //loaded and instantiated
}


public class AirpadPresenter implements Initializable {

    @Inject // injected by afterburner, zero configuration required
    NotesStore store;

    @Inject // injected by afterburner from -Dhost=locahost (system properties)
    String host;


    @FXML // injected by FXML
    AnchorPane noteList;

    @Override
    public void initialize(URL url, ResourceBundle rb) {
        //view constructed from FXML
        NoteListView noteListView = new NoteListView();

        //fetching and integrating the view from FXML
        Parent view = noteListView.getView();
        this.noteList.getChildren().add(view);
    }
                
                

afterburner.fx was extracted from https://github.com/AdamBien/airhacks-control, an attendee-management application. afterburner.fx is used for the implementation of http://lightfish.adam-bien.com UI, https://github.com/AdamBien/airpad and https://github.com/AdamBien/floyd

Sources: https://github.com/AdamBien/afterburner.fx Issues: https://github.com/AdamBien/afterburner.fx/issues

Meet afterburner.fx at Java EE User Interfaces Workshop.