Grails Anti-Pattern: Everything is a Service

The context

Grails makes it very easy to put any logic of your application in a service. Just grails create-service and you’re good to go. There’s a single instance by default, injectable anywhere. Powerful stuff and makes it easy to get up ‘n running very fast!

Creating a new application, following so-called “best practices” from blogs like these 🙂 and the ‘idiomatic Grails-way’ described in the docs and in tutorials work in the beginning, but there’s always a tipping point — where the application has grown a reasonable size — where one should start following a different, maybe less-Grailsey, strategy.

So what can go wrong by creating services in your application?

Continue reading “Grails Anti-Pattern: Everything is a Service”

Grails Anti-Pattern: Locally Optimized Dynamic Finders Everywhere

The context

Grails makes it very easy to persist and find stuff using domain classes. It uses GORM (Grails’ Object Relational Mapping) under the hood, which by default uses Hibernate to map domain classes to tables in a database. Powerful stuff and makes it easy to get up ‘n running very fast!

Creating a new application, following so-called “best practices” from blogs like these 🙂 and the ‘idiomatic Grails-way’ described in the docs and in tutorials work in the beginning, but there’s always a tipping point — where the application has grown a reasonable size — where one should start following a different, maybe less-Grailsey, strategy.

So what can go wrong by using dynamic finders on a domain class?

Continue reading “Grails Anti-Pattern: Locally Optimized Dynamic Finders Everywhere”

Debugging Grails 3, Spring Boot or Gradle with Eclipse

This is a small post for those who’s primary IDE is Eclipse for developing Grails 3 apps or plugins — and are still wondering how to debug their application.

First of all, to clarify: there’s no “Grails” debugging, it’s just Spring Boot and Gradle these days, with Grails 3. Any way to debug these kind of applications allows you to debug a Grails 3 application.

There’s lots of SO posts and Google hits about this subject, so I’m creating this post also as a short “simplest solution” summary for myself and for others.
Continue reading “Debugging Grails 3, Spring Boot or Gradle with Eclipse”

JavaOne 2016

ted-vinke-oracle-openworld-2016-appreciation-event

It’s been a great week at JavaOne 2016! Here’s a photo I took just before Gwen Stefani and Sting came on stage at the Oracle Appreciation Event in the AT&T Park in San Fransisco, home of baseball’s World Series-winning San Francisco Giants. What a crowd! What a week.