Since Git is awesome. It also provides functionality of making aliases. Example [shell]git config –global alias.co checkout [/shell] Here we created co as an alias for checkout (All the aliases that are created goes into .gitconfig file under home folder). Now to checkout a branch named testBranch, We can also write [shell]git co testBranch Switched […]
Since we use git numerous times a day over and over, hence needs maintenance. There are few commands that will help you to keep our git healthy. If you feel that you git has somewhat slowed down, these would do the trick for you. Since ours is a pretty big project . I run it […]
The other day, Farid came with an interesting problem of binding a Time String to java.sql.Time. We straight away found the answer in using a CustomTimeEditor and registering it using a CustomPropertyEditorRegistrar bean. We were able to come arrive at this solution, thanks to this StackOverflow thread. This set me thinking into using a CustomProperty […]
In the 1st part of the series, we looked at how to secure our application with Spring Security Basic Authentication and modifying the JSON Marshaller. However, it could often be the case that the same set of fields shouldn’t be returned on every JSON response. For example, we could very well have a summary JSON […]
Well This is something awesome and can increase the performance of the project when used wisely. using the groovy .memoize() we can ask closures to perform kind of caching. This can boost up the performance of the system. _ Note: This feature is available in groovy 1.8+ Well Let me Explain this Using Examples […]
Recently, I got to learn about the scoped services in grails and I found it worth sharing. For instance: A Service marked as ‘session’ scoped would be instantiated once for a session and remains there throughout the lifetime of the session. This can be used to store user specific data in this service bean class. […]
We often need to execute linux shell command from our groovy code. What I had to do in my project was to resize the image saved on file system. I was doing something like : [java]String command = "convert -adaptive-resize ${width}x${height}! ${sourceFilePath} ${destinationFilePath}" Process process=command.execute() process.waitFor() [/java] The above code makes a new image file […]
So, Grails 2.0 was released a few days back and I upgraded my application to it as soon as I came to know of its final release and it rocks.!! Among the many things which are making a lot of noise on grails 2.0, there seems to be a lack of noise over the GUI […]
Hi, In my recent grails project, i was working on creating Apps for Facebook Fan Page and needed to show data to the user in such a way so that if he/she has “Liked” the page, then the content would be different from the case when the user has not liked it. In simple words, […]
There is a case stuck recently in my Grails development project where I need to increase the connection timeout between the browser and the server, because of the reason before the response get completed server leave the connection which resulted in no response. My colleague Himanshu told me to change the setting in server.xml, which help […]
In my recent grails project, I was working on mobile version of the application and needed to redirect users to the mobile version of our application, if they are accessing the application from any mobile device. I looked at various techniques/codes to detect the mobile device and redirect users to the specific URL. I encountered […]
Hi, In my current grails project, we are using Facebooks Apps for our application so that any user who wish to use that app, can attach it with his/her Facebook Fan Page manually by visiting the App Profile Page and then adding it to the Fan Page. Then the attached facebook app can fetch data […]