Griffon 0.9 sneak peek: infrastructure updates
1. Configuration
Early releases of Griffon would let you specify buildtime configuration in a single file: griffon-app/conf/Config.groovy. In a more recent release another file was added: griffon-app/conf/BuildSettings.groovy. Unfortunately many developers mistakenly thought that any configuration set in Config.groovy was available at runtime, and not many knew about the existence of BuildSettings.groovy. Starting with this release there's a new way to work with configuration files:- Application.groovy - remains as the source for MVC group configuration. No other configuration flags should be set on this file, however this rule is not actively enforced by the build system.
- Builder.groovy - still the place to configure all builder contributions, no changes here.
- BuildConfig.groovy - formerly known as BuildSettings.groovy, this file contains all packaging and deployment configuration. This is also the place where plugins will look for data they might require during script execution.
- Config.groovy - promoted to runtime. This file should contain all other runtime configuration that does not belong in Application.groovy, for example GSQL's inject rules.
An additional tweak for BuildConfig.groovy is available too. This file holds the buildtime configuration for a single application, so you can't share it with another application unless you copy and paste the contents. Well it turns out there's another option. Buildtime configuration that is to be shared across applications can be placed at $USER_HOME/.griffon/settings.groovy. This is the same way buildtime configuration works in Grails.
2. Groovy support
Griffon 0.9 comes with the latest Groovy 1.7.3. Enuff' said
3. Build event order
In the past, build event handlers provided by plugins would be executed in the order they were found: alphabetically. This means that if plugin A depends on B, script A depends on script B and it requires events from B to be handled before... you were out of luck. Well not anymore, the build system now uses a new approach. It will still look for events in alphabetical order, but it will immediately rearrange the execution order as soon as it encounters a plugin with a dependency on another plugin.4. Project documentation engine
Another feature stemming from Grails 1.3.x. It is now possible on application and plugin projects to run the same documentation engine that powers the Griffon Guide.Keep on Groovying!
About 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
December Issue Now AvailableBDD and REST
by Brian SlettenMocks and Stubs in Groovy Tests
by Kenneth KousenAlgorithms for Better Text Search Results
by John GriffinKnowns and Unknowns of Scrum and Agile
by Brian Tarbox