Bridge technologies: Groovy and Grails

Groovy and Grails are the kind of technology that I like to call “bridge technologies”. This is the real value of them for me and on this post I’ll try to explain my definition of a “bridge”.

What is a bridge?

It’s an architectural construct that allow us to go from point A to B easily. You’ll not have to climb a huge mountain, fly, run like crazy or take a big jump: you just use what you already know (walk) to get to the other side.

Some technologies are bridges. Looking back at my education I can detect some of those. The first probably was Visual Basic. When I wanted to start my life as a developer the desktop was the main media: the web was starting, but it was not something so common (at least not here in Brazil). So the first language I tried was C++, which was a frightening experience. All those parameters and functions to create a single window! For someone who was just starting and didn’t have access to so many resources as we have today that was a huge challenge for me. A challenge that I almost loose.

So, actually by accident, I discovered Visual Basic and using only the mouse and a few lines of code I could start to develop my first desktop application. Of course it was a rough one, ugly and badly written, but was my first desktop application. Little by little I started to do some experiments with the Visual Basic syntax and constructs and begin to like that because as more and more I discovered about the language more confident I became.

Later Java emerged and I really wanted to learn object orientation and all that stuff but my mind was too “procedural” (maybe Dijkstra was right). Was really hard to understand that at the beginning because Visual Basic was object based, not object oriented at that time before .net. But I also learned Delphi in parallel and since I was getting used to it, and Delphi was object oriented I could start little by little to play with object oriented concepts on my projects. One day I was confident and started coding in Java, which I still do today, and also got back to C++ and didn’t feel any fear at all!

Again, little by little, I crossed another bridge. Can you see it? There were two bridges here. The first one was Visual Basic. I started with what I already got: mouse skills and the little coding experience (almost nothing) that I got. Later, as I got confident with my coding skills I found another bridge which was Delphi. With those coding skills, a step at a time I was learning object orientation and finally crossed another bridge.

Bridge technologies are this: they allow me to learn something using what I already have. When I think about languages like Erlang, at least for me, they don’t seem like bridges but huge jumps I must take to learn and get to the other side. The learning curve looks like a wall. Now I can talk about Groovy and Grails.

The Groovy bridge


When I first met Groovy I was basically a Java programmer. I could not understand a lot of things like dynamic languages and typing, testing, embedded languages, AOP and so many things that were on the other side of the Groovy bridge! But the language was familiar for me because it really looked like Java. And again, I saw my code starting to change. From things like

public class HelloWorld {
public static void main(String args[]) {
     System.out.println("Hello World!");

To something like

System.out.println("Hello World!");

to finally

println "Hello world!"

It was a smooth transition. I had the chance to keep experiment with the language and as I was getting more confident with it I gave the next step. And so I started to play with weak typing, got to understand the advantages of having a dynamic language and then started to learn other languages which became easier for me to understand like Python, Ruby and so many others. Groovy definitely was one of those languages that made me a better programmer.

And as a Groovy consultant I realized another amazing thing. Many people which wanted to use the Java ecosystem but did not feel confident about it started to learn it through Groovy because the language was really close to many other 4GL languages (I wrote about it some time ago).

Now with the release of version 2.4 I see Groovy as a bridge to Android: people will learn to develop for the Android platform thanks to Groovy and the way it present it’s concepts to the developer.

The Grails bridge

When I crossed the Groovy bridge I found the Grails one. And was another great experience to learn several stuff that were on the other side like convention over configuration, DRY, an agile way of developing web applications and so many other things.

I used what I got: Groovy, and again, step after step I was getting to know details about some technologies that I already used on the Java world but did not know at the time, like Hibernate, Spring, Sitemesh and basically all the libraries used by the framework.

Later as a consultant I noticed the same thing that happened with Groovy happening with Grails: people starting to use and leverage the Java EE platform through Grails. People starting to use things like JMS and JNDI thanks to the way Grails presented these technologies to them in a simple way. And many other people getting a deep knowledge about Spring too and becoming better developers. Another awesome bridge!

Crossing the bridges

The nice thing about these bridge technologies is the fact that you almost always realize that you crossed them by accident in one of those days that you look at yourself and realize that you no longer feel uncomfortable with what you are using.

This is the real value of Groovy and Grails for me: they empower developers using what they already know.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>