Groovy / Grails Update from G2One at the No Fluff Just Stuff Meetup
This gathering was put on by the people who take the excellent NFJS series around the United States throughout the year. I was fortunate enough to attend my first one just a few weeks ago in Seattle and am happy to say that in the course of one weekend, the symposium reminded me of so many reasons why I got into developing software. With that kind of introduction you might think I would have high hopes for the session here tonight and you are right! Fortunately for the 250 or so people, we weren’t to be disappointed.
We began with an update on the Groovy / Grails project from the G2One VP of Technology and initiator of the Groovy project, Guillaume Laforge. He started by telling us a bit about Groovy, it started in 2003 with the following goals:
- To simplify the life of developers
- Seamlessly integrate with the Java platform
- Be dynamic to open up possibilities
- More than 5,000 downloads per month, peaking at 10,000 with a new release
- Over 1,000 mailing list subscribers
- Up to 1,000 messages per month on the list
- After last years Groovy / Grails talks at JavaOne there were over 7,000 downloads in just one week!
Guillaume then went on to detail a few of the big success stories out there, the first one being Mutual of Omaha with 50k lines of Groovy code, half of which is business related and half test code. They use it as a risk calculation engine for insurance policies and involved Java beginners and domain experts when writing their code. Key selling points for them were:
- Big decimal arithmetics (supported by default in Groovy)
- Perfect Java integration
The above points make it an ideal language for business rules expression.
Some of the key points about Groovy for those of you who haven’t come across it yet are as follows:
- Groovy is java like
- It has a flat learning curve
- It is simpler than java for beginners and domain experts
- You can mix and match java and Groovy code together
- It uses the same Strings, regex, security/threading/OO model
- It is not a new paradigm and platform
- And there is no impedence mismatch
- In release 1.5, they added Java 5 features, annotation support, generics, enums etc
- And also brought in EJB3, JPA, Hibernate, sprint annotations, testNG, JUnit4
The Grails update was next and we’ll start here by setting the scene:
- Web frameworks before Grails were boring and painful to work with, too many configuration files to mess about with and you always had to redeploy locally to test changes
- Ruby on Rails was the rage. Guillaume said this of Ruby: “Great principles such as convention over configuration, Don’t Repeat Yourself (DRY) and so on, but it was an unconventional paradigm and platform.”
- The Grails team wanted to help people protect their investment in the Java platform by using the JVM
- They adopted a philosophy of “Build on shoulders of giants” as can be seen here in the list of open source technology they used:
- Spring (DI), Hibernate (OR mapping, handling legacy schemas), Jetty, SiteMesh (for page layout and componentization), AJAX libraries (richer experience)
Grails 1.0 was released in February of 2008 and is now downloaded 14,000 times per month. There are lots of Grails plugins available, provided by what Guillaume referred to as the “super active community”. A few examples of the more popular plugins are:
- New view technology or toolkit integration – GWT, Wicket, YahooUI
- Web Services – Axis, XFire
- Secutiry Integration
- Enterprise oriented – JMS, LDAP, Mondrian, JasperReport
There are already 3 million lines of code in the plugin SVN repository now.
The Grails success stories are as impressive as the Groovy ones, in particular the fact that SAP integrated Grails in order to make it possible to quickly write new front-ends on top of their existing java based NetWeaver composition platform. The big bonus for SAP was that Java developers could quickly get up to speed on Grails.
Sky, the major subscription TV provider in the UK built a new showbiz website that is attracting a massive 186 million page views per month using Grails and have not had any performance problems. Sky is now currently rewriting their main site in Grails.
There were some very good questions and answers following these two sessions, a highlight of the Q&A follows:
Q: What is your view on using groovy as the main language on the JVM?
A: Guillaume – ‘Groovy is meant to be complimentary to Java, not a replacement’. He continued “Java is wonderful for writing highly performant code, but dynamic languages will always be slower than static languages. What is nice is that Groovy could be a playground for ideas that might end up in Java later”.
Q: The reverse of the previous question – Is there a strategy for language compatibility?
A: Guillaume responded: “Between 1.x releases intent was to be backwards compatible, but code might need to be recompiled.” They care about not breaking compatibility unless it is absolutely necessary which may be the case for Groovy 2.0 in order to gain major performance gains.
Q: How does Grails distinguish itself from Ruby on Rails?
A: “Grails is not a clone, only the principles of Rails were brought to running on a JVM. The key differentiator is integration with the JVM, way more advanced with Grails than Ruby on Rails, even with JRuby on Rails.
That put us out of time for Guillaume’s session which was followed up with a brief from the folks at LinkedIn, who are now using Grails to create solutions for a team that needs to be fast to market in delivering their product.
At this point there was a break in proceedings while everybody was treated to some free appies and drinks and the session resumed with an expert panel discussion, the detail of which will be added to a follow up article later in the week.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)