Blog
Memoization in Groovy
18 Jan, 15

Memoization in Groovy

Hi Guys! I would like to share with you a very interesting concept of groovy that I learnt in the Grails Conference I attended last week. The concept is “Memoization in Groovy”. I didn’t hear about Memoization before. I found it quite interesting....
Accessing Domain Constraints:Grails
31 Dec, 14

Accessing Domain Constraints:Grails

Constraints provide Grails with a declarative DSL for defining validation rules, schema generation and CRUD generation meta data. For example, consider these class User { String username String password String email int age static constraints = { username size: 5..15,...
Data Transfer Object(DTO) in grails
28 Dec, 14

Data Transfer Object(DTO) in grails

Data transfer object (DTO) is an object that carries data between processes. Working with a remote interface where each call to it is expensive. Response to each call should bring as much data as possible so if multiple request are required to bring data for a...
Liquibase Basics
25 Dec, 14

Liquibase Basics

Liquibase is an open source technology for tracking, managing and applying database schema changes. All changes to the database are stored in XML files in the form of change-sets and is identified by a combination of an “id” and “author” tag....
Enable Authentication in MongoDB
22 Dec, 14

Enable Authentication in MongoDB

Follow below steps to enable authentication in MongoDB. 1- Run command praveen@acer-aspire:~# gedit /etc/mongodb.conf add ‘auth=true’ or uncomment by removing # it if exists. 2- Add atleast one user to the DB ‘admin’ . Admin user can access all the collections in the...
Create-A-New-User-In-MySQL
12 Dec, 14

Create-A-New-User-In-MySQL

In general, We did all of the editing in MySQL as the root user, with full access to all of the databases. However, in the cases where more restrictions may be required, there are ways to create users with custom permissions. Let’s start by making a new user within...
Groovy list: Get element from last
11 Dec, 14

Groovy list: Get element from last

Groovy has lots of awesome features which helps a lot in every day development, thanks @groovy. This blog demonstrate a cool feature of groovy list. Get element from last in a groovy list Lets have a list List list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] We can easily get...
Locale and Message Bundle in Grails
10 Dec, 14

Locale and Message Bundle in Grails

I am back with a new blog post titled “Locale and Message Bundle in Grails”. In grails we define all the string content/description in message.properties file. In order to fetch the message in gsp page we can use the following code:- <g:set...
Invocation Sequence Of Grails Filters
28 Nov, 14

Invocation Sequence Of Grails Filters

Although In most of cases like doing something before each request grails provides the concept of interceptors with in a controller, but if we like to intercept request in more than one controller than grails another functionality comes into picture called Filters....
Binary confusion
25 Nov, 14

Binary confusion

In computer technology, we have become habitual of using kilobyte (KB) as 1024 bytes, megabyte (MB) as 1024*1024 (1,048,576) bytes. Most of us think that its correct, but it’s not. The International System of Units (SI) which defined the kilo, mega, giga,milli etc.)...
Return Object from grails taglib
25 Nov, 14

Return Object from grails taglib

I was having a use-case where I need to use grails taglib, In this taglib I have a tag from which I need to return a map but I struggling with that as grails taglib by default return’s StreamCharBuffer e.g class ObjectReturningTagLib { static namespace =...
Jquery Validate Plugin
17 Nov, 14

Jquery Validate Plugin

There are several ways to perform validation on html forms but nothing can beat the flexibility and easiness of jQuery’s validation plug-in. The advantage of using this plugin is that you don’t have to write the validation rules from the scratch(ofcourse, thats...
Non-terminating-decimal-expansion
13 Nov, 14

Non-terminating-decimal-expansion

In one of my recent projects, I had to use java.math.BigDecimal to divide two values. I had to use BigDecimal instead of double as this was a Billing application and required the results to be accurate. However, after running the application, I encountered the...