Overview
Griffon 0.2 – "Mountain Lion" – is the third major release of Griffon. It includes significant enhancements to the plugin system via runtime plugins called Addons. It also has additional features in the handlign of MVC Groups and in the packaging of applicaitons.
Principal Features
Addon Support
Griffon 0.2 adds a runtime analog to the Plugin Architecture called Addons. Since Griffon differs from Grails with it's strict runtime/buildtime separation the needs of a plugin architecture needs to reflect this as well. At a high level addons can
- Add anything a Builder adds (factories, delegates, methods, properties).
- Add MVCGroups to the Griffon application
- Add Runtime Events
Sample Plugins that use Addons are
- Gsql Plugin
- MacMenus
More to come!
MVC Groups Enhancements
MVC Groups continue to evolve as the framework matures. Notable changes in the 0.2 series are
- Arbitrary MVC Group Portions
MVC Groups can now add portions other than model, view, and controller. Groups such as actions or animations may be added. - Declaration Order Matters
When calling mvcGroupInit and calling portion scripts, they are all done in the order declared in Application.groovy. The Upgrade.groovy script will re-order MVC Groups from 0.0 and 0.1 to maintain legacy behavior (view scripts called last) and all new MVCGroups are created with a model, controller, view ordering by default. - Argument auto-injection
When a property in a MVCGroup portion matches the name of an argument passed into createMVCGroup the value is injected automatically.
Packaging Enhancements
griffon package has received some re-working with multiple deployment styles. The script now takes zero or more target styles as an argument and places the results in the dist/<style> directory. Current styles are zip, jar, applet and webstart. zip creates a zip of the staging area, jar creates a single jar of the application (suitable for double clicking or deployment in the Java Store. applet creates a zip suitable for extraction into a web tree or a war, and webstart does the same but for a webstartable applications.
Plugin integration with the installer plugin will be forthcoming.
Sample Applications
Griffon 0.2 ships with 5 sample applications of varying levels of complexity demonstrating various parts of the framework. In order of complexity they are:
File Viewer
File View is a simple demonstration of creating new MVCGroups on the fly.
WebStart of Application
Source: git
To run the sample from source, change into the source directory and run griffon run-app from the command prompt.
Font Picker
Font Picker demonstrates form based data binding to adjust the sample rendering of system fonts.
WebStart of Application
Source: git
To run the sample from source, change into the source directory and run griffon run-app from the command prompt.
Greet
Greet, a full featured Griffon Application, is a Twitter client. It shows Joint Java/Groovy compilation, richer MVCGroup interactions, and network service based data delivery.
WebStart of Application
Source: git
To run the sample from source, change into the source directory and run griffon run-webstart from the command prompt. Because Greet uses JNLP APIs for browser integration using run-app will prevent web links from working.
SwingPad
SwingPad, a full featured Griffon Application, is a scripting console for rendering Groovy SwingBuilder views.
[ izpack installer | dmg files | windows zip file ]
Source: git
To run the sample from source, change into the source directory and run griffon run-app from the command prompt.
Weather Widget
Weather Widget integrates with Weather Underground to give a local weather forecast widget. It demonstrates plugin integration and NetBeans Matisse integration with the generate-view-script
WebStart of Application
Source: git
To run the sample from source, change into the source directory and run griffon run-app from the command prompt. You will need to be connected to the internet or already have the macwidgets plugin installed.


