concept execution in category griffon

appears as: The execution, execution, execution
Griffon in Action

This is an excerpt from Manning's book Griffon in Action.

The execution of this script yields the following output:

When an MVC group member is being initialized and it’s a script, the script itself is executed in the context of the builder that has been generated for the MVC group of which it’s a member. Even though Groovy scripts can expose methods as if they were object instances, any method named mvcGroupInit will be ignored in a script, deferring to the execution of the script.

One of the key differences of an MVC group script execution is that the execution occurs as a desired effect of the builder object’s build(Script) method. When the build method of a Griffon builder is called on a script instance, it does more than simply execute the script. Before the execution, the metaclass of the script instance is manipulated so that when a method is executed or a property is referenced, the builder is given a chance to intercept those calls and use the factories registered in the builder. Because of this metaclass integration, the script can declare the GUI in a context-free fashion. That is, there’s no need to prefix nodes with a variable that identifies the real builder type that contributed said nodes; there’s also no need for additional imports in many cases.