Technology

Day 3 at SpringOne2GX 2013

Day 3 of SpringOne2GX'13 was full of new experiences and learning. Knowledge is flowing everywhere and its an amazing feeling listening to the people whom we have been reading and following for so long. The energy and enthusiasm among both attendees and presenters are very high and really appreciable. It reminds me of our Code Camp days...

by Mohd Farid
Tag: Grails
12-Sep-2013

Grails

Day 2 at SpringOne2GX 2013

Multiple parallel sessions on Groovy, Grails & Spring started from early morning sharp at 8:30 am till 6:00pm. So many options/sessions to choose from. Here are the few highlights from sessions that we attended during the day. Real world applications with Spring Data Neo4j by Michael Hunger : Shared many interesting use cases of...

by Amit Jain
Tag: Grails
11-Sep-2013

Grails

Data Binding Threats and Security with Grails

Data binding is the technique of binding two data sources to maintain the synchronization of data which in reference to grails stands for binding incoming request parameters onto the properties of an object or entire graph of objects. These methods allow user to write clean and shaping code without littering the script and data with lots...

by Bansi
Tag: Grails
24-Jul-2013

Grails

Reading Google Drive Spreadsheet in Grails Application

OAuth is a secure mechanism to access google drive. In order to access google drive in your application you need to register your application at the google API console at Google API Console. Read the blog  Integrating Google plus in grails application by Vishal Sahu to see how to get client ID, client secret and redirect URL but in order...

by paridhi
Tag: Grails
13-May-2013

Grails

Using Ftp with Grails

In one of my Grails project I need to drop files over ftp server. Using JSch one can easily transfer files over sftp. Just follow the below steps. 1. Add the below dependency to Grails project "grails-app/conf/BuildConfig.groovy" file [sourcecode language="groovy"] dependencies { compile 'com.jcraft:jsch:0.1.49' } ...

by Puneet Behl
Tag: Grails
04-Apr-2013

Grails

Grails GSP tag: grep

The other day I was reading the Grails docs and I came across a useful GSP tag: grep. I have been using Grails for over 3 years now but just recently got to see this new tag which has eased my life a bit in situations where the list of objects have to be filtered and iterated at the same time to perform some operations on them. The GSP...

by Abhishek Tejpaul
Tag: Grails
31-Oct-2012

Grails

Cool way to get/set processed HTML Markup in filters

Hi,   There was a case where i had to encrypt the HTML output of the GSP before displaying it to user. There are a lot of ways to do it, but i wanted to make is as simple as possible. Hence here is the pattern i used:   Note: This is just an example, you can use this concept to do thousands of cool things, like: pdf export...

by Kushal Likhi
Tag: Grails
27-Sep-2012

Grails

Groovy: Overriding “Plus” operator in a class with interesting example

Have you ever wondered how to overload "plus" operator in Groovy ? It is as easy as adding toppings to your favourite pizza. Let me explain. Let us taka a class for Pizza:   [java] @ToString class Pizza { String name List<Topping> toppings double price } [/java] And another for the Topping: [java] ...

by Imran Mir
Tag: Grails
26-Sep-2012

Grails

Instance based login in spring security core

Spring security loads the roles of user from user role table based on all roles assigned to user and that role is application specific. But In my project i require to assign roles to user based on instance . So when the instance is changed roles should be changed .In grails we can overide the methods of plugin. So when instance change...

by Shaurav
Tag: Grails
26-Sep-2012

Grails

Few Simple steps for integrating Rabbit MQ with Grails

Rabbit MQ as defined by rabbitmq.com is a robust messaging for applications. We used RabbitMQ to achieve asynchronous communication between two parts of the application. I would like to share the same in a step by step fashion. Here are few simple steps that I followed to make my grails application use rabbitmq: 1.Install...

by Mohd Farid
Tag: Grails
25-Sep-2012

Grails

Redis: Heavyweight Tags – an awesome use-case for caching with Redis

Redis plugin provides a beautiful way to cache the html tags. Using this plugin we can make big savings on the time taken to render the gsp tags. [java] <redis:memoize key="someKey" expire="3600" > //Some heavy weight tags rendering // Lots of db / network operations. </redis:memoize> ...

by Mohd Farid
Tag: Grails
25-Sep-2012

Grails

Redis: Tag Cloud using Redis

I would like to share a simple and efficient way of creating tagclouds that I discovered very recently. A Tag Cloud is a pictorial representation of some tags/text. The size of the tag/text is drirectly proportional to the weightage of that tag/text. A sample tag cloud could be seen on our blogs site. How to do it? [java]A very...

by Mohd Farid
Tag: Grails
25-Sep-2012