Grails

Manage javascript library dependencies via bower in Grails

I loved the way node package manager loads and manage the JS dependencies, thought of doing that in my grails project as well. Until now all our third party JS files used to live with our source code. So loading them the way Maven loads Jar dependencies for us is what we are going to discuss in this blog. We would need to install...

by Amit Jain
Tag: Grails
02-Aug-2014

Grails

Email Tracking using MailGun with Grails application

Many times we need to track whether the email is open/deliver/read by users, sent from our application. After analyzing, I concluded that MailGun provides email tracking services that i used with my grails application and thought it worth sharing. There are two ways to send messages using MailGun: #1. HTTP API #2. SMTP I have...

by Vivek Garg
Tag: Grails
24-Jul-2014

Grails

Using Spring Events in Grails

Hi all, I have published a new blog post Using Spring Events in Grails. Spring Events are basically used to perform events asynchronously. In my use case I need to save hundreds of records in the database. So I use Spring Events to save records asynchronously. There is a plugin available in Grails for using Spring Events which...

by madhav.khanna
Tag: Grails
17-Jul-2014

Grails

Uploading a file using only Ajax

We often need to upload a file without refreshing page or even before user submits the complete form. We have been using flash uploaders or i-frames to achieve that. However now it is possible to upload a file using only ajax and javascript. The first thing we need is a HTML form that will allow the user to select the file that they...

by Mansi Arora
Tag: Grails
04-Jul-2014

Grails

Using Groovy’s HTTP Builder Library

In my Grails app project, I had a requirement to make an HTTP call from the server’s end. After a lot of searching, I found some old fashioned Java code to achieve what I was looking for. But I was looking for something more clean, concise and more importantly a groovier way of doing it. On searching a little bit more, I found the...

by jeevesh
Tag: Grails
25-Jun-2014

Grails

OAuth 2.0 using Grails Part – 2

Obtain accessToken from refreshToken In the previous article OAuth 2.0 using Grails Part – 1 I have given a detailed explanation regarding user authentication using OAuth 2.0. In this article i will explain how you can obtain access_token from the refresh_token. Please refer to step(3) of part - 1 of this article where we obtained a...

by pulkit
Tag: Grails
22-Jun-2014

Grails

Managing parallel versions of multiple Grails SDK(Software Development Kits) on Unix based systems by GVM

Sometimes we face a problem with our grails system, means we have many applications to work with which are built using different grails versions. So switching between grails version is a terrible task, like switching symbolic links or changing GRAILS_HOME environment variable each time when we run our different application.   How...

by Satyam Chaudhary
Tag: Grails
06-Jun-2014

Grails

Receive Email using SubEthaSMTP (The local SMTP server).

In my Grails app, I came across a requirement of setting up an SMTP server for receiving mails and extracting their content. After exploring a lot I found SubEthaSMTP to be the most suitable. SubEthaSMTP lets your application receive an SMTP mail very easily. To setup an SMTP server in your application, You need to follow the steps as...

by Akash Sethi
Tag: Grails
14-May-2014

Grails

Generate Excel Sheet with Formula embedded in it

Recently in our application, we needed to generate an excel sheet where some of the values for the column needed to be calculated on the basis of values of other columns depending upon an embedded formula in the excel sheet. To work with excel file we need the following in your BuildConfig.groovy: [java] dependencies{ compile...

by Tanu Siwag
Tag: Grails
13-May-2014

Grails

OAuth 2.0 using Grails Part – 1

Following steps need to be followed for OAuth 2.0 authentication : (1) Obtain OAuth 2.0 credentials from the Google Developers Console: First you need to have a google account. create a project at Google Developers Console after logging into your Google account. Click on the project name go to "APIs and auth" click on credentianls and...

by pulkit
Tag: Grails
13-May-2014

Grails

Grails ‘integrate-with’ command

While reading the Grails docs I came across a useful Grails command i.e. integrate-with. In this short blog I just want to present some of the uses of this command. By using this command we can create Git's .gitignore file: [java] grails integrate-with --git [/java] The above command will create a .gitignore file in the root of...

28-Apr-2014

Grails

Facebook Oauth for fetching page token

OAuth is a secure mechanism to access facebook. To access facebook in your grails application you need to create a facebook app, go to https://developers.facebook.com, click on Apps dropdown, further click on 'Create a new App'. Ensure that you register the URL of you application with the Facebook app you have setup. Save your...

by Mansi Arora
Tag: Grails
28-Apr-2014