TO THE NEW Blog PAGES

AngularJSFront End Development

AngularJS : A “Write Less Do More” JavaScript Framework

AngularJS is a javascript framework which helps to make html pages more dynamic with the least possible code. The idea is to write less, do more. AngularJS is based on the concept of MVC ( Model, View & Controller ). Model : It consists of the data that flows in the application. Before the advent […]

raj
raj
Read

Technology

960 Grid System

The 960 Grid system contains 960 pixel width. This is a CSS Framework. There are 3 types of grids in 960 Grid stystem, that is 12-Column Grid 16-Column Grid 24-Column Grid It is in fact based on a very simple and a basic principle of designing – ALIGNMENT. The 960 Grid system comes with framework […]

Kapil Chotwani
Kapil Chotwani
Read

Grails

Grails : login fails on upgrading shiro plugin.

We are in the process of upgrading our pre 2.0 Grails app to version 2.1.0. This propelled us to update many of the used plugins. One of them was Shiro plugin. We upgraded it from 1.0.1 to 1.1.4. On upgrading the plugin our login attempts were consistently failing, the reason being, this version uses Sha512Hash […]

Hitesh Bhatia
Hitesh Bhatia
Read

Grails

Grails Console, execute from file.

Grails Console is one of the most useful plugins available, it provides a console to application to which it’s installed. This plugin can be used to test code snippets amazingly fast, debug app, create patches and scripts. And the latest update has made it even more fantastic. Now it has an option to execute code […]

Hitesh Bhatia
Hitesh Bhatia
Read

Grails

User-Role hierarchies in spring security

In most of our applications we are using spring security core plugin for the authentication process. We define some roles in that . Have your ever thought about assigning precedence to the roles. Like, You are having 3 roles defined in your application. i.e. ROLE_SUPER_ADMIN, ROLE_ADMIN ,ROLE_ATTENDEE. While using these roles i.e [java] @Secured([‘ROLE_ATTENDEE’]) def […]

Robin
Robin
Read

Grails

GroovyShell.evaluate() : The magician behind Grails Console

Grails console is one plugin that we install as soon as we create a new application. The power and the purpose of the utility is too good to be missed. On one such occasion, I decided to dig the code in the plugin and discovered the magic trick that executes the string that we type […]

Vivek Krishna
Vivek Krishna
Read

Grails

PostgreSQL with Grails

Currently in my Grails project I am using PostgreSQL database so I thought to share my knowledge with everyone. I am using it on Linux operating system. I am mentioning all the steps that I followed to integrate PostgreSQL with Grails . Step 1: Install PostgreSQL on your system To install postgreSql [java] sudo apt-get […]

Gunpreet
Gunpreet
Read

Grails

Log4j: Creating Different Log Files Every Day

To avoid getting log messages in single log file we can create a new log file every day in just one step. This can be done very easily by using DailyRollingFileAppender instead of RollingFileAppender . We just need to add a new Log4J appenders to our configuration file (Config.groovy). In the following example we create […]

Gunpreet
Gunpreet
Read

Technology

Toggling foreign key checks in MySQL

Recently in my project, we needed to import database dumps of a legacy database in MySQL, which was involved in a nested relationship where one tuple could be the parent record of another tuple. We created the appropriate domain structure and checked that the foreign key references were created accordingly. All well and good. So […]

Roni C Thomas
Roni C Thomas
Read

Grails

Pessimistic locking in Grails

We already know that by default Grails scaffold comes with Optimistic locking and it is achieved by version field. Now lets see how Pessimistic locking is achieved in Grails. Grails has a built in method to acquire lock on object. To acquire a lock we will do something like following [java] Book book = Book.get(1) […]

Grails

Discriminator in Grails inheritance

Whenever I have the use case of inheritance in my Grails application I prefer to have the single table for all the classes, to avoid joins and multiple save statement. But one thing I dont like about this is its class discriminator which have the full class name in it. I dont find it much readable […]

Grails

Inheritance in Grails

In Grails, we can have inheritance with the abstract base class as well as persistent base class. Lets take an example to explain this.(All the classes are in the package com.intelligrape.example) [java] class Blog{ String authorName static constraints = { authorName (nullable:false) } } class TextBlog extends Blog{ String textContent static constraints = { textContent […]