(Quick Reference)

1.1.2 Runtime - Reference Documentation

Authors: Andres Almiray

Version: 1.2.0

1.1.2 Runtime

Service LifeCycle

Services now have their own life-cycle methods, similarly to their MVC counterparts. See the section Service LifeCycle for more information.

Service Configuration DSL

Services properties may now be configured externally to the service class, using a simple DSL. Refer to the Service Configuration DSL section to learn more.

External Configuration

Applications now have the ability to specify alternate locations for configuration files and scripts. Simply configure griffon.config.locations in Config.groovy, for example

griffon.config.locations = [
    "classpath:${appName}-config.properties",
    "classpath:${appName}-config.groovy",
    "file:${userHome}/.griffon/${appName}-config.properties",
    "file:${userHome}/.griffon/${appName}-config.groovy"]

Section External Configuration Support covers this feature in more detail.

New Application Events

Instances managed by the application (such as MVC members) will now trigger a DestroyInstance event when the instance is no longer needed. This event is the counterpart of NewInstance.

EventRouter Factory

It's now possible to instantiate custom instances of EventRouter by defining a custom EventRouterFactory.

LogManager Factory

Developers now have the choice to plug in custom LogManager instances, by defining their own LogManagerFactory. The default implementation relies on Log4j.

Remove MVC Configurations

MVC Configurations can now be removed from the application's MVCGroupManager. This paves the way for application plugins that may be turned on/off at runtime.

Vetoable Models

In the past GriffonModel implemented the griffon.core.Observable. With this release they got upgraded to griffon.core.Vetoable.

Skip Lifecycle Script/Handlers

Applications now have the choice of skipping the execution of lifecycle scripts at their discretion. Specify the following flag in Config.groovy to skip them

app.lifecycle.handler.disable = true