The Groovy Grails Experience Wednesday, December 12, 2007

The first major Groovy / Grails conference in North America is just around the corner. The Groovy Grails Experience is going to be in Reston Virginia on Feb 21-23, 2008. The event is bringing key players in the Groovy and Grails community together from all over the globe to put on what is sure to be a really exciting event.

Check out the speaker list. Graeme Rocher! Jason Rudolph! Dierk Koenig! Scott Davis! Andy Glover! Venkat Subranamium! Neal Ford! Brian Sletten! The list goes on and on... This really promises to be a fantastic event. I am really looking forward to it.

The event is coming along at a great time. Groovy is finishing up a really really exciting year that started with the release of 1.0 and ran right up to the release of 1.5 last week. We have seen a bunch of new public facing Grails sites go live this year as well as lots of internal application development being done with Grails. Grails is closing in on the very much anticipated 1.0 release.

Good times continue!

Grails 1.0 RC1 Has Been Released Tuesday, October 16, 2007

Grails 1.0 RC1 has been released! See the release notes for details about many of the new features.

This is fantastic news for the Groovy and Grails community.

In a few hours I am getting on a plane to London to speak at The Grails eXchange. I am really looking forward to finally meeting in person some of the folks I have been working with for so long now.

Maverick On Rails Sunday, September 09, 2007

Mark Cuban says...

"I'm such an exciting guy, I downloaded Ruby on Rails and read the documentation as well. That's what Saturday Nights are for."

Maybe Mark will come out to the upcoming NFJS show in Dallas and learn about Grails. :)

Interesting Groovy Loops Detail Tuesday, August 07, 2007

While fixing a bug in Grails last night I came across something that I found interesting. At first I was really puzzled but now that I know what is going on, it all makes perfect sense.

A unit test that had been passing for some time just started failing. I isolated a specific revision of a specific file that seemed to be causing the test to fail. The test passes with version X of the file and the test fails with version X+1 of that file. I spent some time diffing the 2 revisions and couldn't find anything that seemed relevant. Eventually I figured out the specific change that was causing the failure. There was code that looked something like this...


someCollection.each { someElement ->
// do something with someElement
}


That code had been changed to look something like this...


for(someElement in someCollection) {
// do something with someElement
}


The code inside the loop was exactly the same for both versions. The only difference is the original code was using "each" to iterate over the collection and the new code was using a "for" loop to do the same thing. I puzzled over that for a bit trying to figure out what was going wrong and after discussing with my co-developers the problem eventually became clear. Code inside the loop was making use of someElement inside of a closure and later that closure was being executed. Consider this...


def listOfClosures = []
def numbers = [1, 2, 3]
numbers.each { number ->
listOfClosures[number] = { println "number is $number" }
}
listOfClosures[1]()
listOfClosures[2]()
listOfClosures[3]()


As you might guess, the output from that looks like this...


number is 1
number is 2
number is 3


Now consider this...


def listOfClosures = []
def numbers = [1, 2, 3]
for (number in numbers) {
listOfClosures[number] = { println "number is $number" }
}
listOfClosures[1]()
listOfClosures[2]()
listOfClosures[3]()


The output from that looks like this...


number is 3
number is 3
number is 3


With the "for" loop approach, the same "number" variable is used each time through the loop so by the time the loop completes, the value of "number" is 3 which is what is used by the time the closures execute. With the "each" approach, a separate variable is used for each iteration so each closure accesses the "number" that was around when the closure was declared. None of that is broken or a bug. I believe it is all working as it should.

Thanks to Charles Nutter and Graeme Rocher for helping with that.

My Apologies To The New York City SIG Friday, July 20, 2007

This past Wednesday night Andy Glover and I were scheduled to co-present at The New York Java Special Interest Group. Andy was going to give a 90 minute session on Groovy and I was going to give a 90 minute session on Grails.

Wednesday turned out to be crazy day in New York. Weather made it difficult for air travelers to make their way in to JFK Airport. The huge steam pipe explosion that happened in mid-town Manhattan made it very difficult to drive in to Manhattan. The whole story is a very long one but the short of it is that Andy's flight was canceled and so was mine. We couldn't get a second flight booked for Andy but we were able to get one booked for me. Unfortunately mine was an indirect flight and the second leg was delayed numerous times and I finally got to JFK to find that because of the steam pipe explosion in the city, the trip from JFK to the meeting location was well over an hour and by the time I got into the city, there was no point. I think the meeting was scheduled to run until about 8:00 and I think I got into Manhattan shortly after 8:00.

I was really disappointed myself as I have never had the opportunity to work with Andy before this event and I was really looking forward to it but mostly I felt bad for all of the developers in New York who made it to the show only to find out that there were no speakers. The New York developer community is really enthusiastic about Groovy and Grails and the large audience that turned up to see the show represents that. I am sorry that they were left to look at an empty stage Wednesday night. I promise all of them that we were scrambling all day to work it out and each time we came up with a solution another problem came up, mostly related to shut downs at JFK. I hope that many of the folks who came out to the SIG meeting will make it to the NFJS show in Princeton New Jersey the weekend of August 10th. I will not be there myself but my friends Jason Rudolph, Scott Davis and Venkat Subramanium will all be there with Groovy and Grails sessions.

Again, I offer my apologies to everyone who came out to the show Wednesday evening and I hope that you will invite us again.

Alternate Syntax For URL Mapping In Grails Saturday, May 19, 2007

One of the cool new features that was introduced with Grails 0.5 is Custom URL Mapping. The syntax for declaring the mapping looks something like this...


class MyUrlMappings {
static mappings = {
"/product/$id" {
controller = "product"
action = "show"
}

"/$blog/$year/$month/$id" {
controller = "blog"
action = "show"
constraints {
year(matches:/\d{4}/)
month(matches:/\d{2}/)
}
}
}
}

Since the release we have added support for an alternate syntax (which I happen to like) that looks like this...

class MyUrlMappings {
static mappings = {
"/product/$id" (controller:"product", action:"show")

"/$blog/$year/$month/$id" (controller:"blog", action:"show"){
constraints {
year(matches:/\d{4}/)
month(matches:/\d{2}/)
}
}
}
}

Dynamic languages like Groovy make these sorts of things really easy to support. Behind the scenes of this url mapping there there is no grammar file and no tangly parser to manage. The configuration file is plain old groovy code. Blurring the line between code and configuration files by using a DSL like this is so much easier in Groovy that it might be in a language like C++ or Java. You have got to love it. :)

Autism Visibility Continues To Increase

Dover Speedway has announced that the NEXTEL Cup race coming up there in June will be named “The Autism Speaks 400 presented by Visa”. NEXTEL Cup racing is huge here in North America and has a very large fan base. Autism Speaks is one of the largest foundations in the world that is dedicated to autism. I am happy to see them get their name on the marquee of an event like this. That can only help with awareness.

This is not the first time that autism and automobile racing have crossed paths. Jamie McMurray has an autistic niece and partnered with The Autism Society of American in 2004 when he drove the “Drive For A Cure” car. Tony Renna drove the “Cure Autism Now” car in 2003. There have been others.

It has been almost exactly 5 years since my youngest son Jake was diagnosed autistic. In those 5 years I have learned a number of things about autism and one of those things that I have learned is that there are not a lot of people who know much about autism. Awareness is increasing. That isn't because more people are reading medical journals in their free time. Aside from a dramatic increase in the number of kids being diagnosed autistic, the biggest reason that awareness is increasing is that more and more autism is showing up in the mainstream media. Recently some actors and other celebrities have been criticized for jumping on the “autism bandwagon”. These criticisms often refer to autism as the disease du jour. I don't have much to say about that except to say that raising awareness is an important part of this fight and when I see people going out of their way to help with awareness, I am happy to see that.

Cool New Features In Grails 0.5 Tuesday, May 01, 2007

Grails 0.5 was released today and this release is one of the most exciting releases yet. This release has closed the gap on a number of key features that needed to be knocked out before the coming 1.0 release. Some of the new features will be more appealing to some projects and other features more appealing to other pojects. For me some of the coolest new features added in 0.5 are Command Objects, List and Map Support in GORM and Custom URL Mappings. Hundres of JIRA issues have been addressed in this release and significant performance enhancements have been made. The development team got a whole lot done during this iteration. See the release notes for a more complete list of new features.

With the recent release of the first beta of Groovy 1.1, things continue to heat up in the Groovy and Grails communities.

This year I have been speaking at Java User Groups, internal training events and on the No Fluff Just Stuff Tour about Groovy and Grails and I am finding that folks in the Java community are really excited about both Groovy and Grails and the possibilities that these technologies bring to their projects. After a bit of time that really seemed kind of dull for the JVM, Groovy and Grails are making it all fun again and at the same time adding a lot of value to the enterprise by increasing productivity and expanding the possibilities. For example, defining a DSL using Antlr or similar technologies may not have been a realistic possibility for many applications but dynamic technologies like Groovy make things like that not only possible but simple to build. There are many many examples just like that which represent ways Groovy can help developers get their jobs done faster and more simply. Frankly, I don't think Grails would be anywhere near as compelling as it is if it weren't for all of the coolness made possible by Groovy. Grails has taken the possibilities that Groovy provides and leveraged them all over the framework to provide simple concise techniques for web application developers to use to build powerful web applications very quickly.

Grails has earned a lot of respect in the community by getting very far along in a short amount of time. While Grails applications are already being deployed in production environments, both private and public facing sites, the coming 1.0 release is going to push Grails right out there to the front of the pack. This is exciting stuff!

More to come... :)

I Have Been Tagged (Twice) Friday, April 06, 2007

I have been tagged twice recently. First by Jason and now by James. I suppose I need to be a good citizen and play along. :)

I am not really sure what the rules are here. I know that I am supposed to list several things that you probably don't know about me. I don't know if these things are supposed to be funny, embarrassing, personal, impressive, inspiring or what. I don't know if knowing the rules would help me figure out what to write anyway so I am just going to jot out some facts and hope that I don't suffer some sort of penalty for any violation I might commit. :)

I am a member of The American Go Association. I love playing Go, although I am not able to make as much time for it as I might like. My commitment to Go seems to come and go with periods when I will play a lot and periods when I don't play much at all. My friend Lianzhou Yu moved out of state a couple of years ago and that has affected my playing time. Lianzhou is one of the top players in The United States and was a great mentor to have access to. A few years ago my friend Brian Gilstrap and I got together in his wood shop (which I am envious of) to build a couple of Go boards. I am pretty happy with the way my board turned out. I wish I played on it more often. As it is, most games I play these days are played on my laptop against GNU Go.

I won the first large poker tournament I ever played in. The tournament was a charity event to benefit The National Alliance For Autism Research (now Autism Speaks). Having an autistic son, I was happy to contribute and participate in the tournament. There were about 130 entrants. When I heard about this event I gathered up the group of guys that I played cards with regularly and we ended up with 11 of us in the tournament. The final table at the tournament (final 10 players) included 4 guys from our group. In one of the final hands I made a mistake and then ended up getting pretty lucky to beat my friend Paul Jensen out of a big pot and that piece of luck put me in a position to win the tournament.

My name is Jeff, and I am a metal head. There, I said it. I am a fan of heavy metal music. Black Sabbath, Iron Maiden, Slayer, Sepultura, Opeth, Lamb Of God... all guilty pleasures.

I enjoy fly fishing. I tie all of my own flies. I fish mostly for trout in the cold water streams and rivers in Missouri. My late father-in-law introduced me to fly fishing more than 10 years ago. I find less time for fly fishing these days but I really enjoy myself when I do make time to get out in the water.

There was a time long ago when I really, really, really needed a haircut. Why didn't anyone approach me and say something like “friends don't let friends have mullets”?

Now I am going to throw to Dean, Lance, Brian, Eric and Nate.

My Mac OS X Bling Saturday, February 17, 2007

I am now about 2.5 weeks in to my MacBook Pro owning experience. I will say that I am really really happy with the experience so far. I have tinkered with the idea since OS X was introduced and finally decided to give it a go. I am going to provide a rundown of apps I have installed and use. This is everything (I think) that I use that isn't part of the standard OS X install that came with the hardware. If you are an OS X user then at least some of these you already know about but maybe there will be a couple new ones here for you.

Firefox
To be honest, I didn't even give Safari a shot. One of the first things I did was download Firefox. Maybe I should look at Safari, but I probably won't unless at some point I hear/read something that gives me some specific reason to do so.

Desktop Manager
This is a virtual desktop switcher with nice effects (bling) when switching desktops like the rotating cube and others. VirtueDesktops has some nice features but it crashed more than once for me. I may look again when the next release comes about.

TextMate
TextMate is The Full Schizzle. If you edit text (xml, java, c, ruby, groovy, screenplays, etc...) TextMate is for you. If you aren't familiar with TM, visit the site and watch some of the screencasts.

SnapZ Pro X
This is really nice software for recording screencasts.

Adium
Adium is an IM client that allows me to connect to MSN, Yahoo, AIM, Google Talk, ICQ, Jabber and others.

Skype
Skype is another messaging client. The only reason I have this in addition to Adium is that I have a meeting once a week with some folks overseas and we do that over Skype using its group voice capabilities.

NeoOffice
OpenOffice for the Mac. I haven't used it enough to say for sure if I really like it, but so far it is fine.

iRed Lite
iRed Lite is a utility that lets me use the standard MacBook remote control to control more applications than it otherwise does, like NeoOffice, PowerPoint and others.

QuickSilver
A slick utility similar to the built in Spotlight but a little nicer to use, at least for some things.

Spanning Sync
This lets me sync my desktop iCal with my public Google calendar, which I really like. The main site says "coming soon" but betas are available now.

Goban
I don't play computer games, except for Go. This is a nice Go client.

Blender
An awesome 3D animation tool. The movie Elephant's Dream was created with Blender. The entire movie is distributed under a Creative Commons license so you can get all of the production files for free and monkey with the movie if you want to.

StuffIt Expander
I don't have much to say about this one but I use it and include it here for completeness.

Standard dev tools that really aren't peculiar to OS X but I happen to use on my MacBook Pro...

Eclipse, NetBeans and IntelliJ IDEA
I have installed all 3 IDEs. I use Eclipse primarily. I installed NetBeans because I am about to start doing NetBeans Platform development and need to get familiar with the environment. I installed IntelliJ for no particular reason other than I have a license for open source development, though I haven't used it in a couple of years.

I also use Groovy, Grails, JRuby, Ant and the Subversion Client.

I would be happy to hear about your favorite OS X applications.

Groovy And Others Continue To Expand The JVM Horizon Saturday, January 20, 2007

We have had the JVM for over a decade now. There are a whole lot of languages out there that allow developers to build applications for the JVM. The most popular of course is Java. The alternative languages cover the whole spectrum including Lisp, Scheme, Logo, Tcl, Cobol, Ada, Python, Forth, Fortran, Pascal and on and on and on. Why would so many people spend so much effort developing new languages for the JVM or bindings for existing languages to run on the JVM when Sun already went to the trouble of developing the Java language? That is a fair question. The answer varies from case to case. Many of the languages built for the JVM were academic exercises but certainly not all of them. Part of the answer is the fact that the JVM is a fantastic platform for deploying applications but the Java language is not always the best solution for the job at hand.

Among the wide array of languages for the JVM, a few languages have poked their heads up as key players lately. In particular, dynamic languages are getting a lot of attention, for good reason. Of those dynamic languages at this point Groovy and JRuby are among the most popular.

JRuby is a pure Java implementation of the Ruby programming language bringing the power and flexibility of Ruby to the Java platform. One of the significant contributors to Ruby's success is the Ruby On Rails web application framework. JRuby promises to bring that power and flexibility to the JVM. JRuby is a great tool for folks who want to write Ruby code for the JVM but JRuby is not what I want to talk about today. I want to talk about Groovy...

Groovy is a dynamic language written specifically for the JVM. Groovy has a syntax that in many areas is going to be really familiar to Java programmers. Like Ruby has Ruby On Rails, Groovy also has a framework for agile web development and that framework is Grails. Grails has taken a whole lot of inspiration from Ruby on Rails and is a really powerful and fun way to build web applications for the JVM. Grails is bringing the "coding by convention" paradigm to Groovy web programming in a way that is really appealing to developers already familiar with Java's syntax and the rich capabilities of the JVM.

So What Is Happening With Groovy And Grails?

So much is going on with Groovy and Grails right now. The Groovy community has been on track for a long time now knowing that 2007 was going to be a big year. Now that 2007 is here, Groovy and Grails are really in their groove. ;)

Here are some of the things stirring in that community right now:

- Groovy has just released version 1.0. The Groovy community has known that this was coming and having 1.0 out there on the shelves now is a big win for Groovy.

- Manning has recently published Groovy In Action, known as GINA. GINA is being referred to as "Groovy's Pick Axe Book" (a reference to Dave Thomas' definitive guide to Ruby, Programming Ruby). That is not because GINA was the first major book published on Groovy. This has more to do with GINA's clear, direct and thorough coverage of the language.

- Apress has recently published The Definitive Guide To Grails. In The Definitive Guide, Graeme Rocher presents Grails with a real nuts-and-bolts feel that takes developers through comprehensive coverage of the Grails framework.

- Morgan Kaufmann has recently published Groovy Programmers: An Introduction for Java Developers. I have not had time to read Kaufmann's book yet but I think having another general coverage book out there is probably a good thing.

- Jay Zimmerman and Scott Davis have gone live with http://www.aboutgrooy.com/, a great one stop shopping portal for all things Groovy and Grails.

- InfoQ recently published Jason Rudolph's minibook Getting Started with Grails, providing another source of Grails coverage and bringing Grails to the attention of more folks.

- The 2007 No Fluff Just Stuff Symposium Tour is dedicating significant track time to both Groovy and Grails. NFJS has always responded to the community by presenting what developers know is going to be important and the timing is just right this year for the tour to bring Groovy and Grails to the forefront.

- Skills Matter has announced the first 3 day Grails eXchange 2007 event. Grails eXchange focuses on Groovy and Grails in addition to providing tracks dedicated to Java Entperise Edition (JEE) and Ajax/Web 2.0.

- Sven Haiges has announced that his series of Grails podcasts is going to expand to include general Groovy coverage. Sven's podcasts have been a great asset to the Grails community and opening that up to include more Groovy coverage is going to be great for the community.

- Some recent podcasts of interest include Scott Davis' interview with Guillaume Laforge, an interview with Jay Zimmerman and an interview I did with Sven Haiges for the Grails Podcast series.

Developers and Enterprises that are interested in building applications for the JVM are going to find that Groovy solves a lot of their problems really well. All of those Java developers out there will find that learning "The Groovy Way" is not a difficult task and the benefits are fantastic. Combine all of that with the fact that writing Groovy code is just plain fun and you have got a recipe for success.

If you don't already know why so many people are getting excited about Groovy, pickup a copy of GINA and start tinkering. As you start developing your Groovy Kung Fu you will start to question many aspects of "the old way" that have been taken for granted for so long now. Many things about Groovy "just make sense".

Have Fun!

Next Grails Release Coming Soon Wednesday, January 10, 2007

After a bit of a development slowdown around the holidays the Grails development team is back at full throttle working on the next release. Version 0.4 is probably going to be ready to ship within the next few weeks. Version 0.3 was a really significant release in terms of new functionality and addressing some key issues that had been lingering. I feel like 0.4 is even more significant. The team is working hard to add new functionality and also filling in a lot of those little nuisance gaps.

Things are really ramping up in the Grails community. We are seeing folks coming up with interesting plugins. The mailing lists are very active. If you haven't taken a look yet, give Grails a spin. The Quick Start Guide doesn't even scratch the surface of capabilities but is a good first step. Following that guide will take about 10 minutes and you will have a simple CRUD application up and running.

Stay tuned for exciting things from Grails in the coming months.

Groovy 1.0 Has Been Released! Tuesday, January 02, 2007

Finally, after a lot of waiting and a lot of work from the Groovy dev team, Groovy 1.0 has been released.

Thanks to the Groovy dev team for working through all of the challenges, hassles, debates, hard work etc. that were all part of getting to 1.0.

2007 is going to be a big year for both Groovy and Grails. I am proud to be a member of the Grails development team and I am looking forward to what 2007 holds in store for us.

As one of my mentors is fond of saying... Press On!