Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

What are some of the biggest issues/pitfalls with using the Grails framework? I'm learning the framework now, and I really like it, but I need to know what major issues I may encounter when using it and how to avoid them.

share|improve this question
add comment

4 Answers

up vote 13 down vote accepted

IMO, the weakest part of Grails has been the lack of data model migration functionality (ala Rails ActiveRecord migrations). There were some 3rd-party plugins of varying levels of quality, but nothing official.

However, I just discovered that Liquibase has been extended and turned into the database-migration plugin, and that looks promising: http://www.grails.org/plugin/database-migration

On the plus side, for everything I've used Grails for (simple-to-moderately complex web apps), it has been mostly fantastic. I'd say I can get roughly a 2x to 3x increase in development productivity over a Java/Hibernate/Spring/Spring MVC stack.

share|improve this answer
1  
+1. I chose Grails for further work on a poorly written Struts 1 application. The only tricky part for me was sharing cookies across the two servlets. Otherwise it has been a total win. –  kevin cline Mar 4 '12 at 19:40
add comment

Running the integration tests were slow as the grails environment takes time to load and only a fraction of that time is required to run the test. This will increase the turn around time when you are developing code which writes to the db. The other problem has already been mentioned by Kaleb in his answer (about the data migration). I also found that whenever I was stuck, the no of forums I could get help was limited when compared to the help available for hibernate and spring.

share|improve this answer
    
Running tests: just run them in interactive mode - this way you avoid the start up –  Ralf Aug 4 '11 at 18:43
2  
forums: my experience is that I get an answer to all my questions within 4 hours on Stackoverflow - mostly direct from the grails committers... –  Ralf Aug 4 '11 at 18:44
add comment

A current pitfall to using the framework is its current poor integration into the gradle build system. It currently uses a plugin to accomplish this, but the plugin itself breaks with new versions of grails (as I have recently tried to use and to fix). They plan to fix this problem in future version by making gradle part of the grails build system (instead of gant), but the lack of an build system that you can easily integrate is a problem. However, this pitfall will go away in the future.

Another pitfall is the dynamic nature of the language. You really MUST write tests for everything. Most of the errors in your code are found at runtime. It is really a different way of thinking about a program. Reliance on the compiler to find some of your mistakes do not happen with this framework. I'm not saying it is bad, it's just different (and a pitfall if you're not familiar with it).

share|improve this answer
    
+1 for Gradle. Can't wait for it to be used. –  nrobey Feb 10 '13 at 21:43
add comment

I like whole grails/groovy concept, although I personally have used plain groovy more than grails I think they are both splendid.

The only downside (in my personal experience) is poor IDE support. I thought (rather optimistically) that as SpringSource had an excellent Eclipse build and were strong supporters of Grails that this would be the way to go. The groovy plugins are difficult to install, code completion is flaky (always a problem with dynamic languages but giving me a choice of 60 methods isn't that helpful), debugging can be tedious as it often requires steping through groovy's internal code, and, in the latest release installing the groovy plugin breaks the Java debugger!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.