afterburner.fx

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

Introduction to afterburner.fx

Building a component from scratch

afterburner.fx comes with:

  1. @java.inject.Inject DI of presentation models and backend resources
  2. Seamless integration with SceneBuilder and FXML files
  3. Built-in separation of view, presenter, model / service and CSS files

License: Apache 2.0

Goals:

  1. Overall code reduction
  2. Strict separation of generated and implemented code
  3. Highest possible non-intrusion
  4. No external libraries or dependencies
  5. Maven 3 build support

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 and airpad

Maven 3 coordinates:

                    
    <dependency>
        <groupId>com.airhacks</groupId>
        <artifactId>afterburner.fx</artifactId>
        <version>1.3</version>
    </dependency>
    
                

The easiest way to start:

                    
    mvn archetype:generate -Dfilter=com.airhacks:igniter
                    
                
Meet afterburner.fx at Java EE User Interfaces Workshop.

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