page banner
avatar
'Creating custom GSP tags and tag libraries in Grails' post illustration
Creating custom GSP tags and tag libraries in Grails

Grails tag libraries are designed to provide content formatting capabilities right on a GSP page. The 'tag' is an action that can be declared in a form of an HTML element. This action can accept an enclosed content and parameters defined as the element attributes to render a modified HTML. For instance, the following built-in tag iterates and renders each element of the list object using the template specified in the content:

avatar
'Grails Unit Testing: covering domain classes and services' post illustration
Grails Unit Testing: covering domain classes and services

Unit testing in Grails is currently implemented with Grails Testing plugin. The plugin provides unit testing facilities through the GrailsUnitTestCase class which offers a lot of useful methods for mocking Grails-specific objects. This post demonstrates how some of these methods can be used to test Grails domain classes and services.

avatar
'Filtering user access in Grails' post illustration
Filtering user access in Grails

Today we’ll talk about the ways to filter user access to some controllers and actions in the Grails application. There are few solutions that could be really useful for implementing this task. So let’s look at a quick overview of them.

avatar
'Escaping Deadlocks' post illustration
Escaping Deadlocks

Concurrent programs is not a novelty today, almost every modern application executes in multiple threads. But as concurrency brought us better resource utilization and throughput, it also introduced a number of issues nonexistent in serial execution. One of them is deadlocks. A deadlock is a situation where in two or more competing actions are each waiting for the other to finish, and thus neither ever does.

avatar
'Increasing efficiency in Grails' post illustration
Increasing efficiency in Grails

Modern web applications are counting on the big amount of users, so efficiency is a very important aspect of a web development. Today we’ll talk about the ways to increase efficiency of the web application, developed on the Grails platform.

avatar
'Effectively Immutable Objects' post illustration
Effectively Immutable Objects

An immutable object is one whose state cannot be changed after construction. All the beauty in these objects is that they are simple and safe. In multi-threaded applications all concurrency issues boil down to coordinating access to mutable state. The less mutable state, the easier it is to ensure thread safety. That’s why you should always consider making your objects immutable whenever it is feasible. Creating an immutable type is not a complex process, but you should follow a handful of rules to stay away from pitfalls it definitely implies.

avatar
'Synchronizing threads with Java locks' post illustration
Synchronizing threads with Java locks

Java locks often supersede synchronized blocks and methods by allowing to back out from the synchronization attempt. This post shows how to use the feature, and demonstrates some other basic concepts, like the lock fairness and reentrant locks, which should help you to get started with the lock-based synchronization.

avatar
'Command object in Grails' post illustration
Command object in Grails

Using command objects in Grails is a simple way to perform data binding and validation when there is no need to create domain object. In this tutorial I will show you some examples of using it.

'Simply about Spring AOP' post illustration
Simply about Spring AOP

This week I would like to talk about aspect oriented programming. A lot of programming paradigms like OOP, modular programming and other, let to divide functionality into logical parts (functions modules, classes). But these functional elements may be marked out into separate modules. Aspect oriented programming (AOP) has as a target to provide separation of functionality and addition to points where it really needs.