Posted by Jason Rudolph on 16th December 2007
The Chinese version of Getting Started with Grails made its debut last week.

In fact, InfoQ has been steadily growing their Chinese Grails portal for quite a while now. There you’ll find updates on the recent Groovy and Grails support in IntelliJ IDEA 7, Guillaume Laforge waxing philosophical on Groovy DSLs, a (familiar) article on using Grails+EJB3, and more.
Add these resources to the Japanese and Korean docs on grails.org, Sven’s upcoming German book on Grails, and undoubtedly several other international resources in the works, and we’re rapidly starting to see a whole new meaning to good i18n support.
Tags: Book, Grails, Groovy | No Comments »
Posted by Jason Rudolph on 2nd November 2007

It turns out that hotels prefer that you not bring your own bottles of scotch to the bar. Who knew?
Marcel Molina explains the three pillars of beautiful code as: proportion, integrity, and clarity.
Jim Weirich gives kudos to Groovy as the inspiration for Ruby’s Builder library. (Cool! Cross-pollination goes both ways. Not a zero-sum game. Rinse. Lather. Repeat.)
If you show up at RubyConf with a Compaq, apparently you spend the morning calculating the distance to the nearest Apple store.

David Black reminds the “veeee-gans” that they’re special.
Nathaniel Talbott: Camping matters because it gets your mind off the drug and refocuses you on the addiction. (OK. Perhaps I paraphrased.)
Taking a short break to push a new app live to the world - there’s some darn good satisfaction in that!
Ryan Davis: Flog your code. Heckle your tests. And while you’re at it, flog your feeds, flog your daily habits, and ask your boss and your coworkers to flog you. You’ll be better because of it.
Wisdom of Matz…
- When asked about his second favorite programming language: “I love all programming languages, except for several.”
- On working with Apple: Some brief comments on his assistance with Leopard, but offers that “Ruby on the next version of OS X will be even better.” (Hmmm. Speculation about a future Apple product. I suspect that Apple’s legal hounds all paused momentarily as they detected a distant disturbance in the force. Regardless, let’s hope he’s right. Some other languages haven’t been so fortunate.)
- When asked what kind of programming he does day-to-day: “Ruby.” Ha! Go figure.
- On whether Ruby is suitable as a first programming language to learn: “Some parents don’t give their children sharp knives, but some do.”
Tags: Groovy, Ruby | No Comments »
Posted by Jason Rudolph on 17th October 2007
After a HUGE week of Groovy and Grails news, the momentum culminates today at the first International Grails eXchange in London.
In case you missed it, the past week has offered announcements including…
Graeme and Guillaume kicked off the conference with a Groovy and Grails “State of the Union” keynote highlighting the remarkable momentum behind these two projects, the significant advancements each project has seen this year, as well as a look at the road ahead. The next three days promise a wealth of information, and not just on Groovy and Grails, but also on Hibernate, Yahoo! UI, Dojo, Spring, Sitemesh, Flex, and other collaborating technologies.
And other technologies (even ones that may not necessarily be commonly thought of as Groovy/Grails collaborators) have a presence here as well. Rock on! I’m consistently impressed by the growing cross-pollination and cooperation between these communities: the leading dynamic languages on the JVM.
So tune your feed readers to Technorati and Google, and keep an eye out for seriously good stuff coming out of the inaugural Grails eXchange.
Tags: Grails, Groovy | 1 Comment »
Posted by Jason Rudolph on 11th September 2007
I recently had the pleasure of chatting with Michael Kimsal for a diverse and enjoyable episode of WebDevRadio. Over the course of about 30 minutes, we tackle such topics as Groovy, Grails, Ruby, Streamlined, and the No Fluff, Just Stuff tour.
If you’ve listened to WebDevRadio in the past, you know that Michael comes primarily from a PHP and Perl background. Throw those languages in the mix with Ruby and Groovy, and that’s a whole lot of dynamic language goodness for 30 minutes of podcasting! (We try not to leave any of the low-level languages too battered and bruised, but their extra baggage has simply become too much to bear for day-to-day application development.)
While the podcast itself is obviously intended to focus on web development, in this particular interview, developer productivity may very well outshine web development as the overriding theme. We discuss the profound impact of convention-over-configuration, the future of opinionated software, and whether there’s ever such a thing as too much choice.
Many thanks to Michael for having me on the podcast.
–
Download via iTunes
Download the MP3 directly
Tags: Grails, Groovy, Interview, Ruby, Speaking, Streamlined | Comments Off
Posted by Jason Rudolph on 2nd September 2007
Grails 0.6 is in the wild, and watch out…your Grails development is about to get a serious shot in the arm!

Without a doubt, the developer experience was one of the key motivating factors in my original journey to Grails (and away from some Java web frameworks that shall remain nameless). And somewhat unfortunately, while the last few releases have been packed with new features and increased modularity, each release has brought with it slower start-up times, more time needed to run tests, etc. As a framework still on it’s way to 1.0, that’s probably acceptable, and perhaps even expected, as performance optimizations had not yet been a priority. But as someone that greatly values the developer experience, and as someone that regularly stands in front of a room full of developers while waiting for a demo app to start, the speed bumps in 0.6 are a welcome improvement.
And these speed increases are no small enhancement. We’re talking about at least a 50% reduction in start-up times. The next time you run grails run-app or grails shell, you’re bound to think it was preceded by a stealth installation of some crazy new plugin.
grails install-plugin powerthirst (NSFW)
In fact, these speed bumps make experimentation the most viable it’s ever been with Grails. Wanna try something out before adding it to your service class? No problem. Just run grails shell and you’ve got a fully-bootstrapped Grails environment with complete access to all your domain classes, service classes, etc.
And as someone who thinks you can never have too may tests, the fact that your unit and integration tests now run faster is a big boost as well.
Of course, improved developer productivity isn’t the only thing that’s noteworthy in this release. There are several new features to try out as well. Some of the heavy hitters include
And not only does development itself have a newfound flow to it (thanks to the speed increases discussed above), this release also introduces a DSL for defining web flows and managing conversational state in your application. This DSL greatly simplifies much of the logic traditionally crammed into controllers, and instead expresses the behavior in a much more natural and readable manner. Be sure to check out Graeme’s example to get a feel for what’s possible with this new and rich means for expressing the flow of your web application.
It’s worth having a look at the release notes for full details on the many improvements in this release, complete with code samples and screen shots.
This marks the last big release prior to Grails 1.0, so grab it while it’s hot, and have fun!
Resources
Tags: Grails, Groovy | No Comments »
Posted by Jason Rudolph on 22nd July 2007
Having tackled the conventional approach to Grails domain models as well as an XML-based solution for hooking Grails up to a non-conforming schema, it’s time to consider another option.
Whether you’re disheartened by writing too much XML (and prefer annotations instead), or you’re looking for a domain model solution you can use both with Grails and without Grails, EJB3 entity beans will get your where you want to be. In “Advanced Domain Models in Grails”, we’ll see the exact steps needed to take your plain ol’ statically-typed EJBs, and equip them with the dynamic superpowers of Grails domain classes (all without adding a single line of code to those poor POJOs). Feel free to download the sample app and take it for a spin. (Be sure to have a look at the included README files for all the details.)
Don’t have any EJB3 entity beans to use with Grails yet? No problem. The Ant script included in the download (and first discussed in yesterday’s post) not only includes the ability to reverse engineer Hibernate mapping files from a database schema, but also to produce EJB3 entity beans based on the schema. Once again, you’ll likely want to tweak the output somewhat to get your classes looking just the way you want them, but compared to manually performing the DB-to-POJO mapping, this tool is incredibly handy. (Thanks again to Raffaele Castagno for providing this script.)
Knowing that Grails embraces convention over configuration, is there any room left for a fourth part to this series? (Hint: “Convention over configuration” != “Convention instead of configuration.”)
Tags: Grails, Groovy, Java | No Comments »
Posted by Jason Rudolph on 21st July 2007
We began Part 1 of this adventure with a greenfield application that chose to kindly comply with all the standard Grails conventions. Now it’s time to venture into the land of non-conformity.
We first looked at hooking Grails up to a non-standard schema over a year ago now, way back in the days of Grails 0.1. This clearly remains a topic of much interest, as that tutorial has held its ground week in and week out for 13 straight months as the most highly-trafficked post on this site. Grails has seen significant progress since then, so an updated example is certainly in order.
In “Advanced Domain Models in Grails”, I’ll demo the exact steps needed to gain all the dynamic persistence goodness that GORM has to offer, regardless of whether your schema plays nicely with the Grails conventions. With just a sprinkling of configuration - 5 minutes of effort or less - we’ll be up and running. In fact, you can download and try out the app now. (Be sure to have a look at the included README files for all the details.)
To make this process even easier, the download includes an Ant script developed by Raffaele Castagno for reverse engineering the schema to produce the initial Hibernate mapping files for you. The resulting HBM files will need a bit of tweaking (as you would expect, since the whole point of this exercise is that your schema doesn’t map cleanly to your domain classes), but compared to coding up the HBM files from scratch, this tool is incredibly handy.
Keep an eye out for Part 3, where we invite EJB3 entity beans to the party. Stay tuned.
Tags: Grails, Groovy, Java | 1 Comment »
Posted by Jason Rudolph on 20th July 2007
For any developer that’s ever touched JDBC (and it’s safe to assume that’s most Java devs, right?), GORM is one of the many Grails features that addresses a clear and prominent pain point in the Java space. Put simply, GORM is humane ORM. It means leaving the low-level database-related plumbing to the framework and instead investing your time in the business tier. After all, your app needs to solve a business problem, right? And it’s a pretty safe bet that your business analysts didn’t spend time listing out any requirements about managing DB connections, result sets, sessions, or DAO code. Nope. They’re focused on a much higher level, and we should be too.
If you’re fortunate enough to be developing a greenfield application, you can just follow the Grails conventions and come close to forgetting that there’s a database under the covers at all. GORM dynamically equips you with all the persistence methods you need to manage your domain, and yet you still have the ability to drop down to that lower level should the need arise.
NFJS is in RTP this weekend, and in “Advanced Domain Models in Grails”, I’ll be looking first at the functionality that GORM provides out-of-the-box and then exploring how you can mold GORM to take advantage of its benefits in a variety of environments. We’ll start by looking at a sample app that colors within the lines of the Grails conventions, and you can download and try out that app now. (Be sure to have a look at the included README files for all the details.)
Inside the app you’ll find working examples of various relationship types (including many-to-many, which people occasionally struggle with at first), constraints, and the always-cool dynamic finders. Check out the test cases in test/integration. Among other things, the test cases illustrate exactly how the entities relate to one another. (Want to know which side of a many-to-many relationship can perform a cascading save operation? Check out the tests.) To run the tests, just execute grails test-app from the command line.
Of course, there’s just no substitute for hands-on experimentation. To interact with the domain models yourself, simply navigate into the project directory and run grails console to get an interactive shell where you can
experiment with the domain objects first-hand. Or better yet, write additional tests of your own! If you get adventurous (and I hope you do), try out some of the many other possibilities available in GORM.
Be sure to watch for Part 2, where we begin our venture into the land of non-conformity. Stay tuned.
Tags: Grails, Groovy, Java | 2 Comments »
Posted by Jason Rudolph on 5th July 2007
In one fell swoop, the Groovy team and JetBrains have seemingly annihilated the biggest reason (and perhaps the only reason) not to use Groovy in your Java project. With today’s release of Groovy 1.1-beta-2, you can now use the groovyc compiler to jointly compile both your Groovy and Java classes. And here’s the kicker: it manages all the dependencies for you! Groovy class A extends Java class B which references Groovy class C? No problem.
Read the rest of this entry »
Tags: Groovy, Java | 1 Comment »
Posted by Jason Rudolph on 13th June 2007
InfoQ has just published my review of the must-read book, Groovy in Action. If you're doing anything with Groovy, or even considering it, you really owe it to yourself to pick up a copy of this book. If you haven't had a chance yet to check out Groovy in Action, the review should give you a good idea of what to expect from the book, and Manning has also thrown in two chapter excerpts from the book (including one on the incredibly handy Groovy JDK) to give you a feel for it first-hand.
If you notice that the review reads a bit differently than what you might typically expect, that's due to InfoQ's unique requirements for its reviews. InfoQ reviews aim to "contain less metadata and more data, or said differently, less talk about the book and more talk of the content in the book." The hope is that the reader learns something even while reading the review. It seems like a cool idea to me. So, what do you think? Let us know in the comments over on InfoQ or below.
Tags: Book, Grails, Groovy, Java | 1 Comment »