Groovy Calamari - Issue 77 - 16th Apr 2017

Datetime:2017-04-17 05:34:00         Topic: Groovy          Share        Original >>
Here to See The Original Article!!!

Grails

Grails Anti-Pattern: Everything is a Service

@tvinke warns you about an issue you are going to face in any medium to big size Grails project:

You are going to have a lot of Services.

He advocates placing classes such as Builders, Factories, Helpers in src/main/groovy. Then register those classes as Spring Beans. s

He shows how to declare Spring Beans two ways: in resources.groovy or with Component Scanning.

If you don't want to get rid of your services, consider at least two things: A good naming convention across your team (I like suffixes, e.g. GormService ...) and proper packaging.

wordpress.com

Grails Anti-Pattern: Locally Optimized Dynamic Finders Everywhere

Dynamic finders have a clear advantage. They are easy to understand, they are readable.

@tvinke cautionary tale encourages you to centralized them in Services.

if all of the queries are in a neat, well-defined place for everyone to see and go to, the most likely it is that team members will default to basic human behaviour follow the defined path, and color within the nicely defined lines of that part of the codebase

wordpress.com

Grails Spring Security Core Plugin Custom Authentication

This week we published a Grails Guide about the development of a custom authentication mechanism.

Spring Security Core probably the most used plugin in the ecosystem allows for a big degree of customisation. Explore what it is possible.

grails.org

Gradle

Making the most of your gradle build

@aalmiray 's talk at Greach is full of links to interesting Gradle plugins and tips such as:

  • Invoke Gradle anywhere with Gdub
  • Define dependencies version numbers in gradle.properties.
  • Master your Gradle -Jacoco integration

Geb

Geb Best Practices

@marcinerdmann is Geb project lead. As a Geb enthusiast, attending his talk at Greach was a privilege.

The talk is an advanced Geb talk, and it is full of tips and best practices to get your Geb game to the next level.

slideshare.net








New