The day one at GGX 2013 London was really awesome. The atmosphere, the sessions and the speakers really made the day wonderful. We could feel the buzz and energy of the thriving and closely knitted Groovy/Grails community all day long. The show was very well managed by Skills Matter and nicely driven by Peter Ledbrook. Here are some...
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...
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' } ...
Hi Guys, I took a session on Regular Expressions in the company, i have shared my slide on slideshare. You can see it here : http://www.slideshare.net/rajdgreat007/regular-expressions-14971247 I have discussed following topics in that slide : What are regular expressions Need for regular expressions ...
@Canonical: It's very useful annotation. It provides the combination of features of @ToString (default implementation of toString() method based upon the fields in the class), @EqualsAndHashCode(default implementation of equals() and hashCode() method of the class based upon the fields in the class) and @TupleConstructor (provides the...
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] ...
In almost all the applications that we work on, we have to transform elements of a collection in one way or the other. We can do it in different ways. Let there be a domain "Employee" with following attributes: [java] class Employee{ String firstName String lastName Double salary } [/java] And we have 5 Employees: [java] ...
A very useful enhanced method in Groovy 2.0 is inject method whose key purpose is to pass the outcome of first iteration to next iteration and keep on passing till all the elements of collections are processed. Lets start with an example, consider a class Employee with name and salary as attributes: [java] class Employee{ ...
@Log : This annotation provides the log object in groovy class. By using it you don't need to create the Logger object, it automatically provides log object. Example: [groovy] import groovy.util.logging.Log @Log class Person { String name String address String city public void logDetails(){ ...
@TupleConstructor annotation provides the classical constructor with default properties. It will create the constructor with first parameter as address, second parameter as name etc. Constructor implementation depends upon the order of the variable declaration. One thing you need to ensure that you need to pass the value in same order as...