Griffon is desktop application development platform for the JVM.Inspired by Grails, Griffon leverages concepts like Convention over Configuration, modularity, and freedom of choice. The framework at its core is written 100% in Java allowing developers to write their own applications with only Java. Other programming languages such as Groovy and Kotlin may be used too, in which case additional capabilities such as builders and extension methods become available.

Griffon supports 4 different UI toolkits: Swing, JavaFX, Apache Pivot, and Lanterna.

Griffon encourages the use of the MVC pattern but it's not limited to a single interpretation, you can for example apply standard MVC, MVP, MVVM, PMVC and others. 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 regardless of the UI toolkit of choice.

Seasoned Java developers should be able to pick up the pace quickly, as the framework relieves them from the burden of maintaining an application structure, allowing them 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