Sponsored Link
GR8Conf US - Next Level Grails in 2 Days course
Are you going to Minneapolis for GR8Conf US? Unfortunately, I am not 😔.
If you are a lucky attendee of GR8Conf US, Jeff Brown (Grails co-founder) will be the instructor of a 2-day Grails course on the 24th and 25th of July; just before the conference. A generous discount is available for conference attendees.
If you are not attending GR8Conf US, we are preparing an ONLINE Training Series! 1 day, instructor-led workshops which will be offered online and delivered by Jeff Scott Brown.
Topics:
- Publishing REST Services with Grails 3
- GORM deep dive
- Advanced Groovy Metaprogramming with Grails 3.
No excuses, master Grails 3 this summer! â›±
GORM
Single Database Multi-Tenancy - Discriminator Column
Multi-tenancy support in GORM 6.1 is one of the features that excite me the most. In the latest Grails Guide, you learn how to leverage Multi-Tenancy features of GORM 6.1 to build an application which uses a single database, but it partitions its data using a discriminator column.
A follow-up to the Database per Tenant Guide Guide.
Checked exceptions rollback transactions since GORM 6.0.0
From Programming Groovy 2
Groovy has less ceremony than Java. That’s crystal-clear in exception handling. Java forces us to handle checked exceptions. Groovy does not force us to handle exceptions that we don’t want to handle or that are inappropriate at the current level of code. Any exception we don’t handle is automatically passed on to a higher level.
The wait is over:
GORM 6.0.0 or above rolls back transactions for checked and runtime exceptions.
Grails
Grails Testing Support library
One of the most visible changes in Grails 3.3.
The Grails Testing Support library provides support for writing concise expressive tests for Grails artifacts with simple easy to use traits and supporting classes. The use of Traits makes functionality woven into the test class at compile time, which allows developers to explicitly view and explore the code. In addition, the Grail Testing Support makes testing more IDE friendly so developers can take advantage of auto-completion and click through navigation.
You will no longer need to guess which properties are available to you when you use the @TestFor annotation. Traits for the WIN!
Gradle
Creating Multi-project Builds
@ysb33r shows you how to combine a Groovy-based library project, an Asciidoctor-based documentation project and a Java distributable command-line application in Gradle multi-project build.
Learn how to:
- Create a modular software project by combining multiple sub-projects.
- Have one sub-project consume artifacts from another sub-project.
- Use a polyglot project with ease.
- Run similar named tasks in all sub-projects.
- Run tasks in specific sub-projects without changing to that subproject’s folder.
- Refactor common sub-project settings into the root project.
- Selectively configure sub-projects from the root project.
Publishing Tools
Groovy static sites with Grain
@yermilov17 shows you step by step how to get a static website built with Grain; a Static Web Site Building Framework For Groovy.
Moreover, he shows how to generate the site, publish it automatically to Gihtub Pages with the help of Travis.
He explains how to change the JVM memory configuration in the grainw files. Without that change, I could not get the site up on my laptop. Thus, jump straight to that setting before your run ./grainw for the first time.
I have to confess. I am quite Wordpress fan. 🙈 My blog runs on Wordpress. However, I see the benefits of a static site generator. Specially in combination with Travis and Github pages.
I have a challenge for @yermilov17. Use Grain in combination with asset pipeline. Then, I will start to run out of excuses to keep my site in Wordpress.
Comment
We just said goodbye to Gradle Sumit 2017. Many videos in my youtube playlist. Expect Gradle content in the upcoming weeks.
This week, I link to several Grails topics. Or better said GORM topics. Gorm 6.1 and Grails 3.3 bring many features. With the release of Grails 3.3.0 Release Candidate 1, we are getting closer. Test your apps and give us feedback.
Sergio del Amo