Greater Nebraska Software Symposium
April 4 - 6, 2008 - Omaha, NE
Groovy, the Blue Pill: Writing Next Generation Java Code in Groovy
There are wild-eyed radicals out there telling you that Java is dead, statically-typed languages are passe, and your skills are hopelessly out-of-date. Those extremists are the same ones who don't bat an eye at throwing out years of experience to learn a new language from scratch, pushing aside a familiar IDE for a new one, and deploying to a whole new set of production servers with little regard to legacy integration.
While this "burn the boats" approach to software development might sound exciting to some folks, it's giving your manager the cold shakes right now. What if I told you that there was a way that you could integrate seamlessly with your legacy Java code, continue to use your trusty IDE and stable production servers, and yet take advantage of many of the exciting new dynamic language features that those fanatics keep prattling on about? You'd probably say, "Groovy!" I would, too...
This talk focuses on integrating Groovy with your legacy Java codebase in a way that wouldn't raise an eyebrow in the most conservative of organizations. We'll look at the dramatic reduction in line of code you can achieve by simply flipping your POJOs (Plain Old Java Objects) to POGOs (Plain Old Groovy Objects). We'll talk about calling Java classes from Groovy, and calling Groovy classes from Java. We'll look at Groovyc, the integrated compiler that manages Groovy/Java dependencies without a hiccup.
Not once will I tell you to throw out the old in favor of the new. In each case, I'll show you how to integrate the new with the old. Don't throw out your Ant build scripts; mix in a bit of Groovy to spice 'em up. Don't toss out your existing unit tests. (You are unit testing, aren't you? AREN'T YOU?) If not, Groovy is the perfect excuse to get started with a new language in way that improves the quality of your Java application without actually putting the new code into production. That is, until you get hooked on doing things the Groovy way...
If the Red Pill of Dynamic Languages scares the pants off of you (or your manager), don't worry about it. The Blue Pill still offers plenty of benefits. There is no other language on the JVM that offers you the level of deep Java compatibility such that you could rename your "dot J-A-V-A" files to "dot G-R-O-O-V-Y" and not skip a beat. Of course, they both end up with a "dot C-L-A-S-S" extension at the end of the day, so there's good chance that no one would ever be the wiser anyway. Groovy: funny name, serious software, and Java through-and-through.
About Scott Davis
Scott Davis is the founder of ThirstyHead.com, a training company that specializes in Groovy and Grails training.
Scott published one of the first public websites implemented in Grails in 2006 and has been actively working with the technology ever since. Author of the book Groovy Recipes: Greasing the Wheels of Java and two ongoing IBM developerWorks article series (Mastering Grails and in 2009, Practically Groovy), Scott writes extensively about how Groovy and Grails are the future of Java development.More About Scott »