Friday, April 10, 2009

Griffon Applications


For those who don't know Griffon, is a new framework developed in the Groovy language for building Desktop applications. Griffon is a plug-in centric framework that comes with a central tool for building, developing, and packaging your applications.

Developing desktop applications with Griffon is very similar to developing web applications with Grails. The framework is based on the Model - View - Controller concept. In Griffon, the Model is a basic POGO, the view is composed with SwingBuilder, and the controller ties the Model and View together. The controller is automatically injected with the view and the model, so access to properties in either is very simple.

In addition to the capacities provided by the Griffon framework, standard Groovy and Java code can be included into the projects. Groovy code goes in the project's src folder and Java code can be included as JAR files in the lib folder. This allows you to use all of the third party and special home-grown libraries that you know and love.

Applications written in Griffon will run on any Java JVM greater than version 1.5+, but things run best when using Java 1.6+ specifically version 1.6 update 10 or greater.

Learning Griffon

Since normal development of GUI applications in Java is painful, I was very happy to see this new framework and eager to check it out. Here are my first impressions and a couple of simple applications that I developed with Griffon.


  1. The Griffon project is very young, but is amazingly functional

  2. There is a limited amount of documentation on the Griffon site, but between the Java Swing documentation, Groovy SwingBuiler documentation, the Griffon mailing list and examples from the Griffon development teem I had no problems getting answers to my questions.

  3. Developing GUI applications is actually FUN and not PAINFUL.

  4. A Griffon application can be developed quite rapidly.

  5. Griffon work great with MigLayout and Glazed Lists, two staples of Swing development.

Sample Applications

You can launch the sample applications by clicking on the first link provided. That is a JNLP Web start file. The second link is an archive containing the source code for the application. Bot applications were developed with Griffon built from SVN revision 624.

  1. DNS Resolver - src - Performs DNS resolutions and reverse IP lookups

  2. Visual Tail - src - Monitors a text file (same as 'tail -f' on Linux)

Please feel free to post your comments, and make sure to check out Griffon!


Jim Shingler said...

Ya, Griffon is pretty cool!

hansamann said...

I think you can leave both Java source and Groovy source in the /src folder. This is one of the things Griffon has done differently from Grails. At Grails' times, there was no joint compiler. Now, there is.

Nice writeup!

Anonymous said...

Hi Mike,

The link to the source seem to be broken , Can you please point to the correct link
Also Can you please point to steps to configure Griffon on windows