Griffon is desktop application development platform for the JVM.Inspired by Grails, Griffon leverages the use of the Groovy language and concepts like Convention over Configuration. The Swing toolkit is the default UI toolkit of choice however others may be used, for example JavaFX.

Griffon encourages the use of the MVC pattern. Griffon also follows in the spirit of the Swing Application Framework (JSR 296), it defines a simple yet powerful application life cycle and event publishing mechanism. Another interesting feature comes from the Groovy language itself: automatic property support and property binding (inspired by BeansBinding (JSR 295)), which makes creating observable beans and binding to their properties a snap! As if property binding was not enough Groovy’s SwingBuilder also simplifies building multi-threaded applications, say goodbye to the ugly gray rectangle (the bane of Swing apps)!

Grails developers should feel right at home when trying out Griffon. Many of Grails’ conventions and commands are shared with Griffon. Granted, Swing is not the same as HTML/GSP but Builders simplify the task of creating the UI.

Seasoned Java developers will also be able to pick up the pace quickly, as the framework relieves you of the burden of maintaining an application structure, allowing you to concentrate on getting the code right.

Quick Start

The recommended way to get started with a Griffon project is to use a Lazybones project template and Gradle. You can install these tools with SDKMAN.

$ curl -s http://get.sdkman.io | bash
$ sdk install lazybones
$ sdk install gradle

Next register the griffon-lazybones-templates repository with Lazybones' config file. Edit $USER_HOME/.lazybones/config.groovy

bintrayRepositories = [
    "griffon/griffon-lazybones-templates",
    "pledbrook/lazybones-templates"
]

List all available templates by invoking the following command

$ lazybones list
Available templates in griffon/griffon-lazybones-templates

    griffon-javafx-groovy
    griffon-javafx-java
    griffon-javafx-kotlin
    griffon-lanterna-groovy
    griffon-lanterna-java
    griffon-pivot-groovy
    griffon-pivot-java
    griffon-plugin
    griffon-swing-groovy
    griffon-swing-java

Select a starting template from the list and invoke the create command

$ lazybones create griffon-javafx-java sample-javax-java

Compile, run and test the project with any of these commands

$ gradle build
$ gradle test
$ gradle run

You may use Maven as an alternate build tool

$ mvn compile
$ mvn test
$ mvn -Prun