As per Groovy's documentation, static import is supported and can be used as in java. However static import usage in Groovy can lead to unpredictable issues. I have been happily using static imports for some time until today when I found very strange issue. Let me demonstrate it with an example of what issue I am talking about.
Monday, February 20, 2012
Saturday, January 14, 2012
With Groovy comes great power of DSL(Domain Specific Language)
Slowly and steadily I have started realizing the power of DSL(Domain Specific Langauge) and I found Groovy a very powerful tool to write DSL. DSL takes programming to next level by allowing input to a program be given as set of actions than merely a function call.If you want to explore DSL in detail, I would recommend you to read Martin Fowler's book on DSL.
Friday, January 6, 2012
Groovy/Grails : Integration tests for multi-threaded application
Recently I came across a situation in my project, where I had to write integration test for multi-threaded code. Basically I had a business method in service class which executed some portion of it's work in separate thread. Now in order to write integration test for such method, test method should ideally wait for the thread(s) created by service class to complete before asserting result. But there was no way I could figure out if the threads created by service class has completed. So then I thought to refactor my code in a way that I can figure from outside if the threads have got completed or not.
Monday, December 26, 2011
Rapid Web Development with Groovy/Grails
I have been working on Groovy/Grails for past 6 months and it’s being an amazing experience. In less than 4 months time we have been able to create a new web application from scratch and deploy in production.
First, it’s Groovy which makes coding so easy that anybody will fall in love with it. A piece of code that would have taken 10 lines of code in JAVA can be written in couple of lines in groovy. On top of it is a web framework i.e. Grails, which makes web development look like child’s play. Yes, believe me or not, it’s truth that I have experienced. Atleast after working purely in java with frameworks like JSF, Struts etc., I feel so.
Location:
Gurgaon, Delhi, India
Subscribe to:
Posts (Atom)