Grails

New Features in Try/Catch – JDK 7

In our applications we generally make use of try-catch blocks to handle exceptions. Since JDK-7 , It has certain new features. These features are quite good , I must say. Some of the new changes in try/catch bloack are : 1.  Multiple exceptions handling in only one catch block. 2.  Finally out of scope. (Try-Catch […]

Robin
Robin
Read

Grails

Integrating Spring AOP with Grails Application

AOP means Aspect Oriented Programming Enables encapsulation of functionality that affects multiple classes in separate units. Complements Object Oriented Programming. Cross Cutting Concerns : Functionality whose implementation spans multiple modules. Different From OOPS Sometimes we want to implement common functionality through out some classes, through out some common method. We can achieve that functionality by […]

Mohit Garg
Mohit Garg
Read

Grails

What is Delegate ??

Suppose a scenario, where User and Account classes are linked as below: [groovy] class Account { String email String password // … other fields } class User { Account account String name String address // … other fields } [/groovy] At the time of creating a new User, and accessing the user members, we write […]

Amit Kumar
Amit Kumar
Read

Grails

Integrating LinkedIn Groups in grails application.

Hi, In one of my recent Grails application, i needed to integrate LinkedIn groups with the application. In my previous post, we discussed about Integrating LinkedIn API in any grails application. To add a LinkedIn Group, we first need to authorize the LinkedIn account which has either created that group or is the member/admin of […]

Vishal Sahu
Vishal Sahu
Read

Grails

Using Data URLs for embedding images in Flying Saucer generated PDFs

We extensively use Flying Saucer to generate PDFs from GSPs in our grails applications. However, there is always the issue of embedding images from within the application because the URLs are usually relative to the environment and as such, embedding them in PDFs with a URL in the src attribute is cumbersome. To get around […]

Grails

Login with Twitter

This application saves user’s time for registration by providing a way through which user can login into application with its twitter credentials. Application will get the user details from his corresponding twitter account and will do the registration programmatically, so user can easily manage account through his twitter account. Five simple steps to connect with […]

Amit Kumar
Amit Kumar
Read

Grails

Manage Multiple Log File

Different Levels of Logging to Different Appenders or Files: When a project is running, then lot of log messages (all type of log messages e.g. Error, Fatal, Warning, Info, Debug etc.) are logged into a single log file. Many times we try to find the error messages only, instead of debugging the complete application. In […]

Amit Kumar
Amit Kumar
Read

Grails

Grails 2.1 command line alias

I am a linux user and like to do everything on command line, I find it more productive. Anytime I need to write long command or use any command frequently, I always create an alias for that, for example while running the test cases I need to run the command so I created alias for […]

Grails

Auto Completion for Grails Scripts with Dynamic Version Determination

We are constantly striving to be more productive by minimizing key-strokes for a lot of commonly used shell commands. Alias is one way of achieving it, but it isn’t always the answer. Bash auto completion is one feature that I use a lot. To avoid the hassles of working with multiple grails projects, I use […]

Services