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...
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...
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...
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...
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' } ...
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...
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...
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] ...
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...
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...
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> ...
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...