It just takes 15 seconds. Send your
details and we’ll get back to you soon.

Category Archives: Design Pattern

Applying layout to template at Runtime in Grails Application

There are use cases where we render the template from our action and update some div in the page using ajax. The downside of this approach is when the user hits the url directly in browser address bar and the … Continue reading


Setting count bubble in jQuery mobile Accordian Head

Sometimes we want to show count bubble in Accordion head that is different from the what jQuery mobile provides by default. To add count bubble to Accordian head, we use following piece of code: But it doesn’t give us the … Continue reading


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.

I found this tag extremely helpful in rendering the public facing pages of our site. the pages which refreshed not very frequently and required few seconds to render(if done without caching).

The difference in the time taken to render the page is dependent on our choice of right candidate for Memoizing.

Hope this helps!!!

Best Regards
Mohd Farid

Continue reading


Using PostConstruct annotation with Grails Services

We can use PostConstruct with Grails Services and injected Spring Beans. This PostConstruct annotation can be used to annotate a method which needs to be executed after dependency injection to perform any initialization. Check this for more details. We also … Continue reading


Setting default layout in Grails application

Grails uses Sitemesh for adding layout to the views. Layouts are located in layouts folder and to add layouts to the view we generally add any of the following line in head But most of the time we have single … Continue reading


Groovy annotations for ToString and EqualsAndHashCode

As I am a lazy programmer most of the time I dont implement toString and equals methods on my grails domain classes. I would like to say thanks to Groovy for helping me out and giving me a ready made … Continue reading


Get our latest updates, Subscribe.

By signing up, you agree to our Terms of Service and Privacy Policy.