SpringOne 2GX 2011

Chicago, October 25-28, 2011

Griffon reaches 3rd year

Posted by: Andres Almiray on 2011-09-10 02:00:00.0
Happy Birthday Griffon! I can't believe it's been 3 years since Danno posted the first announcement. Griffon has come a looong way since. We started the project with the goal of making a framework that would deliver the same productivity gains on the desktop area as Grails did on the web. I don't think we understood the implications of such goal at the time, however I'm quite happy with the results so far. We're really close to achieving the goal we set forward since the beginning.

During the last year the framework has received plenty of feedback from many sources. The team welcomed two new members that injected new life and new perspectives. The code itself has grown and shrunk a couple of times, and yet we keep adding interesting features to it. The plugin community is also building up. In particular I'd like to thank Nick Zhu for his heoric efforts in porting Grails' validation API into a Spring-free plugin. He did it mainly because he needed the behavior for an application he was working on. We're so glad he decided to open source the plugin immediately, as feedback flows in both directions without barriers (one of the major advantages of open source ;-)).

These days the team is getting ready for two big overhauls that should result in better performance during buildtime and a faster/smarter build for the framework itself (we switched to Gradle a year ago but we haven't really tapped into it, yet). In the meantime you can enjoy interesting features like
  • Building a 98% Java based Griffon application. Say what? Aha! You thought that because Griffon is based in Grails this means that applications must be written in Groovy? Well, not really. You can write any artifact in Java (you can even use Scala or Mirah if you're feeling adventurous). This is possible because every single Griffon artifact is backed by an specific type (an interface) and a default implementation. These things are weaved during compilation (weaved is a misnomer; in Groovy terms we apply AST transformations). Want to give it a try? Just type the following command.

    griffon create-app sample -fileType=java

    Now you have an application with the initial MVC written in Java. Look into the lifecycle directory. You'll see that the scripts have been replaced by Java classes too. Hey, even the global event handler (Events.groovy) can be written in Java, leaving only the basic configuration files in Groovy source.
  • While we're on the topic of Java, have you ever wanted to apply Groovy-like AST transformations to Java code? Look no further, Project Lombok is your choice. It so happens that Griffon has a Lombok plugin that allows you to apply @Bindable to Java source code for example. Neat, huh?
  • Application archetypes. This feature has the potential to change how an application is bootstrapped in the first place. You can catch a glimpse of it when using the included jumpstart archetype, like this

    griffon create-app sample -archetype=jumpstart

    Go ahead, give it a try. Also, why don't you append -fileType=java to it. That's right. You get a full Java application boostrapped using the jumpstart archetype.
  • We may not be ready with GORM but we have persistence ready plugins like GSQL, ActiveJDBC, EBean, MyBatis, Db4o, Carbonado, Neodatis, and may other popular NoSQL alternatives
Expect a few interesting features in the path to 1.0. But, if you can't wait until then or if you have a cool feature or a useful fix then go ahead, fork us at github and send us a pull request!

Here's to the first 3 years of development of the most exciting piece of code I've been involved. Looking forward to the following years :-D

Keep on Groovying!

About Andres Almiray

Andres Almiray

Andres is a Java/Groovy developer and Java Champion, with more than 11 years of experience in software design and development. He has been involved in web and desktop application developments since the early days of Java. He has also been teacher of computer science courses in the most prestigious education institute in Mexico. His current interests include Groovy and Swing. He is a true believer of open source and has participated in popular projects like Groovy, Griffon, JMatter and DbUnit, as well as starting his own projects (Json-lib, EZMorph, GraphicsBuilder, JideBuilder). Founding member and current project lead of the Griffon framework. He blogs periodically at http://jroller.com/aalmiray. You can find him on twitter too as @aalmiray. He likes to spend time with his beloved wife, Ixchel, when not hacking around.

More About Andres »

NFJS, the Magazine

2011-10-01 00:00:00.0 Issue Now Available
  • Plugging into Gradle Plugins

    by Tim Berglund
  • Enterprise Integration Agility

    by Jeremy Deane
  • Relax with Couch DB

    by Johnny Wey
  • Sass...CSS Evolved

    by Mark Volkmann
Learn More »