Groovy
Learning Groovy 3 - Java-Based Dynamic Scripting
As someone who likes learning with Books, @adamldavis's book Learning Groovy 3 is the perfect guide to get me ready for Groovy 3 release:
Also, Learning Groovy 3 has been updated to Groovy 3.0 to include the new Parrot parser which was extended to support additional syntax options and language features. It also includes coverage of Groovydoc, which allows you to embed Groovydoc comments in various ways. And, this book covers how Groovy supports Java type annotations and more.
Install Apache Groovy Programming Language for Linux using the Snap Store
I would recommend you to install Groovy with SDKMan in Linux but this is another option:
Snap Store.
The app store for Linux.
Publish your app for Linux users — for desktop, cloud, and Internet of Things.
Micronaut
Generate A Micronaut Application In Easy Steps
@hashimati built a web app to create Micronaut app by filling form.
This is to Micronaut or Quarkus what Grails Application Forge is to Grails or Spring Initializr is to Spring Boot.
Built-In support for Micronaut in InteillJ IDEA
It seems the folks of JetBrains are considering built-in support for Micronaut within IntelliJ. As someone who uses Micronaut and IntelliJ all day everyday, this is something I super excited about. Please, give them a thumbs-up to signal them that the community wants support for Micronaut in IntelliJ IDEA.
Grails
[SPANISH] Madrid Groovy User Group ¡What's new in Grails 4!
I will be talking about Grails 4 and the necessary steps to migrate from Grails 3. If you are in the area, please come to Madrid Groovy User Group and say hello.
⌛️19:00.
📅 September 17 2019.
📍THECUBE Calle de Rufino Gonzalez 25 Madrid 28037.
How to Reduce Code in Grails Controllers to Minimum
Typically security and similar cross-cutting concerns are best handled with aspect-oriented programming style which means using interceptors in the Grails environment.
Using interceptors makes total sense because probably Spring Security Core plugin annotations don't suffice for them. Maybe, they need to to check not just whether the user has a role but if the user is trying to read an entity belonging to a tenant which the user has access to.
For exceptional states, there are exceptions in Java. You can move the code into the service and throw exceptions at the points where would you normally return from the controller action:
For almost the whole year, I am working in a Micronaut project written in Java with Groovy tests with Spock. We are using a similar approach: a lot of Runtime exceptions in the service layer to keep controller methods dry and then we combine declarative controller exception handling and in some cases global handling.
Comment
A combination of wrist pain, a lot of work, family obligations have kept me out of the newsletter for the past weeks. Apologies for that. I am back with a classic - a mix of Groovy / Micronaut / Grails content.
Sergio del Amo