Home » Tag Archives: Grails (page 2)

Tag Archives: Grails

Grails render images on the fly in GSP

grails-logo

This tutorial will show how to generate PNG images on the fly and display inside a GSP. This can serve as a basis on how to create a more complex behavior. For example, creating report graphs for display in your applications. Sample Output This tutorial will show how to generate simple shapes based on input size and color. Squares and ...

Read More »

Grails Tutorial for Beginners – Grails Service Layer

grails-logo

This tutorial will discuss the importance of the service layer in Grails and how to work with it. It also explains transaction management and how to utilize it. Introduction Separation Of Concerns Consider this analogy: Imagine a company where employees are assigned tasks on different nature of work. For example, say there is an employee named John Doe with the ...

Read More »

Grails domain classes and special presentation requirements

grails-logo

In Grails we often use our domain objects directly as backing model for presentation purposes and only for specialized situations we create value holder objects or DTOs. Beginning Grails developers know how to display individual entity properties pretty easy in a GSP, such as the name of a fictional domain class…             <g:each in=”${breedingGoals}” var=”breedingGoal”> ...

Read More »

Grails Tutorial for Beginners – Grails Service Layer

grails-logo

This tutorial will discuss the importance of the service layer in Grails and how to work with it. It also explains transaction management and how to utilize it. Introduction Separation Of Concerns Consider this analogy: Imagine a company where employees are assigned tasks on different nature of work. For example, say there is an employee named John Doe with the ...

Read More »

Grails Spring Security Core Plugin – Registering Callback Closures

grails-logo

I was searching for a way to hook business logic after successful user login while using Spring Security Core plugin. The simplest way to do this is to register callback closures. It let’s you hook your custom code inside Config.groovy after certain Spring Security events. If you are unfamiliar with this plugin, visit the previous tutorial on Spring Security Core ...

Read More »

Grails Generate Asynchronous Controller

grails-logo

Since version 2.3, Grails supports asynchronous parallel programming to support modern multiple core hardware. Therefore a new Grails command is added to generate asynchronous controllers for domain classes. The generated controller contains CRUD actions for a given domain class. In the example below, we will generate a default asynchronous implementation of a Grails controller. First we create a domain object: ...

Read More »

MongoDB and Grails

groovy-logo

So recently, I had a requirement to store unstructured JSON data that was coming back from a web service. The web service was returning back various soccer teams from around the world. Amongst the data contained in most of the soccer teams was a list of soccer players, who were part of the team. Some of the teams had 12 ...

Read More »

Grails tip: refactoring your URLs

grails-logo

On the current project I am working we use a lot of integration tests. For you non-Grails users out there, Integration tests test your Controller APIs, your Services and any persistence that might happen all very neatly. The only slice of the cake they don’t test from a back end perspective are your Grails filters for which you’d need something ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close