Mitch Pronschinske is a Senior Content Analyst at DZone. That means he writes and searches for the finest developer content in the land so that you don't have to. He often eats peanut butter and bananas, likes to make his own ringtones, enjoys card and board games, and is married to an underwear model. Mitch is a DZone Zone Leader and has posted 2569 posts at DZone. You can read more from them at their website. View Full User Profile

Andres Almiray on Griffon: The Road Behind and the Road Ahead

07.18.2010
| 9475 views |
  • submit to reddit
DZone is celebrating the success of the Griffon framework as it nears its fifth major release,  and there's no better way to celebrate than with our newest Refcard, Getting Started with Griffon!  DZone took some time to reflect on Griffon's history and where it's headed with the project's co-founder and development lead, Andres Almiray.  He said that today marks the fourth year anniversary since he started using Groovy.

Griffon is a Grails-like application framework for developing desktop applications in Groovy. Griffon follows the Convention over Configuration paradigm, paired with an intuitive MVC architecture and a command line interface.  It defines a simple yet powerful application life cycle and event publishing mechanism.  Grails developers should feel right at home when trying out Griffon. Many of Grails' conventions and commands are shared with Griffon.  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.

DZone:  What were the original motivations and inspirations that led to Griffon?  

Andres Almiray:  The Griffon founders had a lot of combined experience on building Java Swing applications, be it regular desktop or RIAs, so they basically knew many of the pain points that a developer will encounter when creating such applications. Each one on his own time and for his own reasons gravitated towards Groovy and Groovy's SwingBuilder. They found that both gave an energetic boost to building RIAs however something was still amiss: a coherent, intuitive and fun way to build the applications; this is where Griffon's story gets intertwined with Grails.

Grails is a full stack web application development platform, and as such provides many features that increase productivity and make programming fun again, but it does so for web applications only. Griffon aims to provide the same benefits but for RIAs and desktop applications, and it does so by following Grails in spirit but not on its whole implementation.

The reason for this split is that Griffon can build, package and deploy an application in 3 modes: standalone, applet and webstart.  Applications deployed in the last 2 modes must be as small as possible in download size, thus bundling Spring and its required dependencies was not an option. Another point of difference between the two platforms is that Grails applications are optimized for a request-response cycle, whereas Griffon applications are driven by any communication cycle the developer desires.

I should close with a small note, developers that do need Spring at runtime can install a plugin in order to get Spring and its required dependencies. Spring support in Griffon via this plugin closely mirrors the one found in Grails.

DZone:  In what areas of desktop application development does Griffon excel?

Andres:  Griffon helps you in all areas of desktop application development. Its build system takes care of automating repetitive tasks, for example it can bootstrap a working application in seconds. It can also package and deploy applications in 3 modes without touching a single line of configuration. Testing a desktop application can be tedious at times, Griffon makes sure that is not the case. And if some functionality is not provided by default then it's probably just a plugin install away.

DZone:  Can you think of any great examples of Griffon apps?

Andres:  Most of the Griffon applications that I'm aware of are those that are built to replace or enhance an existing tool. These tools are mostly of internal use in enterprises. Griffon is also used as a means to prototype applications. And of course you'll find a growing set in the open source space. We hope one of these days someone will publish the news of a customer facing Griffon application available in the wild.
 
DZone:  Today Griffon seems pretty popular on DZone.  How much has the user base grown over the project's history?

Andres:  I'd say it has grown slow but steadly. One of the often cited drawbacks for adoption is the lack of documentation. We're closing that gap now with the immediate availability of the Griffon Refcard =) The last stable release (0.3.1) saw the debut of the Griffon Guide, the first stop to learn all about Griffon's command line interface, testing facilities, plugin system and more.
 


DZone:  What's new in Griffon 0.9?

Andres:  Lots and lots of new things!  First, the build system has been synchronized with Grails 1.3.2.  This means that the following features are now available: dependency resolution DSL, custom build listeners, testing facilities, packaging and plugin enhancements.  It is the testing facilities that excite me most from the buildtime perspective as they enable a wide range of options, most notably the means to port Grail's Spock plugin to Griffon.  From the runtime perspective, the major changes are related to the location of Swing classes, which pose a backwards compatibility breakage (intentional). These breakages combined with the turbo charged buildtime features prompted the upcoming release to jump from version 0.3.1 to 0.9.
 

DZone:  What does the feature roadmap for Griffon 1.0 (if that's the next major version) and beyond look like?

Andres:  Quite frankly, bug fixes and rock solid documentation.  Most of the features that comprise a 1.0 release have already found their way into Griffon core.  There are several buildtime/runtime improvements that can be delivered via plugins, given that the core has stabilized itself pretty fast.  Beyond 1.0 lies better integration with UI toolkits other than Swing (like SWT and JavaFX).  Work on this area has already been started via plugins.  Another interesting point is OSGi integration which we keep an eye on but have yet to write some code in that direction.
___

Tantalizing details, Andres!  Go get the Griffon Refcard now!

Comments

Alex Scott replied on Mon, 2010/07/19 - 7:51am

Having used Griffon for a few weeks, I am extremely impressed.

I've done Swing apps before, and found them to be a real pain. Griffon solves these pains in 2 main ways - SwingBuilder and  Rails. Swingbuilder solves the gui building issues pretty well, and Rails/Spring enables easy MVC creation.

I'd estimate using Griffon probably sped up my development time by 2-3 times, and enabled me to build a better app at the same time.

If you have to do an app in Java/Swing, give it a go.

Santosh Shanbhag replied on Mon, 2010/07/19 - 10:32am in response to: Alex Scott

I tried to do a "run-app" on Windows XP for the sample 'SwingPad' and am getting: 

java.lang.NoClassDefFoundError: and
Caused by: java.lang.ClassNotFoundException: and
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: and.  Program will exit.

 

I am not able to run any of the sample apps as I am getting the same error.  This error seems to be documented in the bugs but I couldn't find a solution that I could understand. My JAVA_HOME is C:\Progra~1\Java\jdk1.6.0_21

 

I want to make some progress but I am pretty much stuck right now. 

 

Thanks,
Santosh

Andres Almiray replied on Mon, 2010/07/19 - 11:04am in response to: Santosh Shanbhag

Hi Santosh, This is a know problem (see http://jira.codehaus.org/browse/griffon-156). In the meantime please avoid using a directory name that contains spaces (like "Document and Settings"). We'll make sure that this problem is fixed before 1.0 is released. Cheers, Andres

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.