Groovy
Implementing Traits at Runtime
Reading about Traits I stumbled upon this statement in the Groovy Documentation:
use of the as keyword to coerce an object to a trait at runtime
@mrhaki explains in the linked blog post with more detail. Moreover, he shows us how to apply multiple traits with withTraits
Parameters with Default Values
I recently need to implement retry functionality in a method invocation. Groovy parameters with default values helped me out. @mrhaki explains you about this Groovy feature.
Groovy Databases
@paulk_asert's slides about working with databases while using Groovy give an overview around the usual operations ( connecting, reading, updating ..) and the advanced use cases ( store procedures, dataset, working with MongoDB or Neo4j)
Checkout the Github repository
How to do logging in Groovy
@BenRipkens shows how to do logging in a plain Groovy project. For those times you are not using a framework. Learn which dependencies to add to your build.gradle file. Decouple your program from specific logging frameworks with SLF4J.
Spock
Testing with Spock, the logical choice
@ilopmar in this vJUG24 Session goes deep about Spock. Watch the video together with the companion repository.
Back in Issue #8, I linked to 14 Spock examples that you should read; another @ilopmar gem about Spock.
Grails
Log4j2 in Grails 3
Today I attended a talk about Logs in CodeMotion Spain by @joaquindiez and @fjrodriguez2. They advocate to avoid multiple line logs. E.g. multiple line stack traces. They recommended the use of Log4j2 which allows such a configuration.
I checked if it is possible to use Log4j2 in Grails 3. @fcnorman anticipated me and got his answer in Stackoverflow.
Comment
I write you from Codemotion Spain. I did one talk about Geb and there are other Groovy ecosystem talks. However it is macro conference and groovy is a tiny portion of the agenda. I get out of my confort zone and see what developers are doing in other communities. For example, I just got out of a great Logging talk. Consequently this issue contains a couple of logging links related to Groovy.
Enjoy this issue and remember to take, once in a while, a look from 10.000 feet. I do it less than I should.
Groovy Calamari