In my recent project, I want to implement permission based framework with spring security grails plugin. What does permission based framework mean? We can create a ROLE at run time based on the permission given to the user. Most of the times, we use Spring security in a way where we pre-define the roles to be used in our apps. But...
IntelliJ IDEA provides a handy debugger for grails, which simplifies debugging. Many people try avoiding using this awesome feature just because, either, they don't want to leave the old habit of using printlns or they complain about the performance issue, and bla bla bla. As per my observation, there is no performance difference between...
I always wanted to test the parameters being passed in the forward method in a controller in my unit tests. Suppose we have any controller like: [java] class DemoController { def anyAction() { forward(controller: "demo", action: "test", params: [param1: "1"]) } } [/java] to test this forward action, we first need to mock...
Hi, Before writing this blog, I would first like to make you familiar with one quote "Be liberal in what you accept, and conservative in what you send". Yes that's what HTTP robustness protocol states. Scenario : We have a use case where our server need to read XML files that are large containing 400 outer element with extremely...
While working on my current application, I had to import a large database using mysql from a sql dump. The size of the sql dump was around 1.5 GB and hence the import was taking long time. I just felt the need of some tool that could help me check the progress of the import. The command I used was: [sql] mysql --user=username...
In my current web application, I had to integrate login functionality via Instagram. To do so, I had to go through the following steps: 1. First you have to register your application using this link. In order to register your application, you need to have an Instagram account which can be done through Instagram's mobile application. ...
In my current grails application, we have started using the AngularJS after realizing that the GSP template engine is a bit slow. Now, I realize how efficient AngularJS can be, and think of sharing my first impressions while using AngularJS with grails app. Following are some of the reasons, that I find, makes AngularJS stands out: ...
In my project on Angular.js I came across a use case where I needed to paginate the HTML tables . DataTable jQuery plugin is a perfect choice in order to accomplish this task. Let us take a simple example to illustrate the use of dataTable plugin: [js] <html> <head> <style> <link rel="stylesheet"...
I never had to worry about whether the classes loaded in our application are in the same class loader or different, until I was stuck with the weird class not found exception. We were using a third party tool (Snowbound's DocViewer) which provided around 10 jar files, which worked well for except one functionality which was provided by 3...
After attending the recent Groovy Grails conference in London recently, I realized how much one can learn from a conference. One gets exposed to some fresh ideas and trends that can really be enriching as a professional. Meeting like minded people and sharing the ideas during the course of the conference is just an added advantage. At the...
The day two at GGX '13, London continued to be spell binding and fun filled. The sessions, again, were really nice and proved to be valueable and insightful. Here are some of the highlights: Road To Grails 3.0 - By Graeme Rocher The session started with overview of the new features of Grails 2.3 and then moved to Grails 3.0. The...
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...