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 Maven archetype and Maven or Gradle. You can install these tools with SDKMAN.

$ curl -s https://get.sdkman.io | bash
$ sdk install maven
$ sdk install gradle

Griffon offers the following Maven archetypes which may be used to bootstrap either Maven or Gradle projects:

griffon-javafx-groovy-archetype
griffon-javafx-java-archetype
griffon-lanterna-java-archetype
griffon-lanterna-groovy-archetype
griffon-pivot-java-archetype
griffon-pivot-groovy-archetype
griffon-swing-java-archetype
griffon-swing-groovy-archetype

Select a starting archetype from the list and invoke the following command to create a project

$ mvn archetype:generate \
      -DarchetypeGroupId=org.codehaus.griffon.maven \
      -DarchetypeArtifactId=griffon-swing-groovy-archetype \
      -DarchetypeVersion=2.16.0 \
      -DgroupId=org.example \
      -DartifactId=console \
      -Dversion=1.0.0-SNAPSHOT \
      -Dgradle=true

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

$ ./gradlew build
$ ./gradlew test
$ ./gradlew run

You may use Maven as build tool

$ mvn archetype:generate \
      -DarchetypeGroupId=org.codehaus.griffon.maven \
      -DarchetypeArtifactId=griffon-swing-groovy-archetype \
      -DarchetypeVersion=2.16.0 \
      -DgroupId=org.example \
      -DartifactId=console \
      -Dversion=1.0.0-SNAPSHOT
$ ./mvnw compile
$ ./mvnw test
$ ./mvnw -Prun