Grails Gathers Steam, Heads for 1.0
In the past few years, web frameworks have increasingly been focused on productivity. Ruby on Rails is seen by many as the poster-child for rapid web development, which has put a lot of pressure on traditional frameworks. In the Java marketplace, a number of frameworks are responding to that call by aiming for increased productivity, rapid development, and support for scripting languages. From Grails to Stripes, RIFE to Trails, Tapestry 5.X and Phobos, there are a lot of people looking for new ways to make Java web development a productive, rapid environment for building web applications that scale.
Grails, a Rails-style web framework using Groovy on the Java platform, has been getting a lot of attention lately, with a rapidly growing community and increasing production use for major corporations including Tropicana and Pepsico. Grails is often compared to Ruby on Rails, which is both an opportunity and a challenge, as people are attracted to the power of a Rails-like framework on a familiar platform, but may move on to Rails itself. A recent set of comparisons imply that Grails has the edge on performance for now, but that new releases of Ruby promise better performance across the board, and that may change.
Although there has been some discussion about support for Ruby within Grails, it doesn't currently seem likely. If, instead of integrating Ruby with Grails, you'd like to integrate parts of Grails with your other applications, it is apparently possible to use the Grails object/relational mapper, GORM, outside of a Grails context, such as in a Java desktop application. All of the major IDEs are showing signs of increased support for Groovy and Grails. There's been some discussion of IDE support in Netbeans, as well as discussion of improvements for GroovyJ in IDEA. Eclipse has the beginnings of a Grails plugin and new releases of the Groovy/Eclipse plugin and Edward Povazan working on improved code completion support with Big Sky Technology.
Grails recently released version 0.5, with improved performance, custom URLs, enhancements to GORM and more. Next on the roadmap is 0.6, with a 1.0 release late in the year. InfoQ spoke with Graeme Rocher, a co-founder and the project lead for Grails about its current success and the future.
When asked about the recent surge in attention for Grails, Graeme responded:
Well, Java developers all over are being made aware that configuration is no longer a necessary activity and Grails is one of the frameworks leading this surge. However, in comparison to other frameworks, Grails has a really strong message around re-using your existing Java knowledge, infrastructure, and code. Grails is as elegant as Rails, but as flexible as Spring MVC or Seam. It really does provide the best of both worlds. As to the uptake, that has really been lead by our community and world of mouth. We spent over a year putting together a 0.1 release; if it had been mediocre no one would have paid any attention. As it is, we have many happy users who are spreading the word and increasing Grails' mindshare.
When comparing Grails to other frameworks for building web applications in Java:
Well, it really embraces DRY and convention-over-configuration. You really have pretty much zero configuration when developing a Grails application. However, you get all of this AND tight Java integration with existing APIs, libraries and frameworks like the Java Enterprise stack, Spring, Hibernate & SiteMesh.
In addition it has a number of key selling points. Including an extensible plug-in system, a domain-driven ORM layer built on Hibernate, and a powerful view technology with Groovy Server Pages (GSP).
On convincing someone to try Grails for the first time:
Developers don't really need a lot of convincing, it is more management that is the struggle. However, if I do want to convince people to use Grails, I just do a quick 5 minute demo and they're sold.
As to where Grails goes next, for v1.0 and therafter, Graeme Rocher said:
We're really focusing on improving the developer experience and getting out 1.0 by autumn time. We have only a few "big" jobs left and then it is just incremental improvements to reach the finishing line. Some things that we have left to do are for example JSP tag library support in GSP, possible support for JPA as a plug-in, and improvements to our unit testing infrastructure.
Overall though we are mainly focused on getting 1.0 out the door after that we'll look at leveraging the infrastructure we have in place and writing many plug-ins for Grails to continue to improve the developer experience. For example I really want to get round to writing a Groovy compiler for GWT that hooks into Grails as a plug-in, which should be fun.
Yoni Goldberg Oct 30, 2014
Dmytro Svarytsevych Oct 30, 2014