Tag Archives: groovy

DRYing Grails Criteria Queries

When you’re writing code, Don’t Repeat Yourself. Now say that 5 times. *rimshot* One of the things that I find myself repeating a lot of in many business apps is queries. It’s common to have a rule or filter that … Continue reading

Posted in Code, Groovy, Web | Tagged , , , | 11 Comments

Grails Embedded Classes ClassCastException

Using ORM tools allow you to map the data to a database independently of how your object model looks. Grails supports one-to-many and one-to-one relationships if you want to have the data in different table. But what about when you … Continue reading

Posted in Code, Groovy | Tagged , , | 6 Comments

Update Table Data in Grails using Ajax Calls

Using Ajax for simple forms can offer users a very clean, simple and fast way to input data. I came across a situation recently where I was looking into replacing a document based workflow with an application. The documents themselves … Continue reading

Posted in Code, Groovy | Tagged , , | 5 Comments

Custom Validators in Grails in a Single App

In my previous post I wrote about Building a Custom Validator in Grails using a Plugin. That’s a great way to build a reusable Constraint that will allow you to share your code among multiple projects. But often you only … Continue reading

Posted in Code, Groovy | Tagged , , | 3 Comments

Build a Custom Validator in Grails with a Plugin

Grails is a really nice MVC framework inspired by Ruby on Rails. The difference is that Grails is built using Groovy and Java and leverages existing, well known frameworks as it’s foundation. It is essentially a fairly thin convention-over-configuration and … Continue reading

Posted in Code, Groovy | Tagged , , , | 10 Comments

Coffee DSL in Groovy

I thought I’d follow up with my previous post with the Coffee Domain Specific Language in the Groovy Language. This is really one of my first forays into Groovy, so it’s pretty rough. It’s really just a direct translation of … Continue reading

Posted in Code, Groovy | Tagged , | 2 Comments