Round hill of the apples - Groovy, Grails, Griffon and a hint of Java

  • Blog
  • About
  • Contact us
 

I've seen the future and the future is Groovy

Since beginning my career in 2000 I have been working with Java.

My first project involved Swing - that's a baptism..

Next, I got to work on a web application which although I was using the raw Servlet API, I thought it was pretty cool. I figured how how to apply an MVC pattern using servlets with Jsps - how cool was that?

Soon I was put on a Struts project and got to use the Struts library (probably the first library I ever knowingly used apart from log4j) - and wow, an actual framework for building an app - this surely was they way to go.

Unfortunately soon after that I was put back on a Swing project again. This time it was different though. The lead developer had developed his own MVC framework for building the app. While this was good in a way, it was so damn complicated that not many on the team could really understand it. It was a web of model objects, property change listeners and many other complicated ideas. After this I vowed to stay away from Swing for good.

Another web project involving Struts 1.1 came up, this time also using a new technology called Spring which seemed a bit strange - Application contexts, dependency injection ? I admit, I wasn't really getting it at first.

Next web project - Oracle ADF faces. Here I learned Ajax, DWR, Toplink. This was cutting edge and it all made sense, we even managed to sneak in a bit of EJB3 and Spring, and I didnt need to write any HTML - surly this was as good as things could get.

Next, two smaller Struts maintenance gigs. Struts was dead to me. JSF was king.

Next - A Spring MVC app. While rich guis were less easy to build this way compared to JSF, the framework as a whole was much less complicated than a JSF project and far easier to debug. Was this hint of the way things were to come ?

Soon, I started playing with Matt Raibles cool AppFuse framework. A working app out of the box, with all kinds of things all working out of the box - Maven, Spring, Security, Managers, DAOs and even tests. Hell, you could even choose your web framework, persistence mechanism, database and it generated jsps and tests! Surely every software house should be using this stuff ?

Sometime in 2009 I was talking to a colleague of mine about how I had tried Ruby on Rails, and how while I loved its ideas, I just couldn't get to grips with syntax . Also there were these things call plugins and mixins. I just didn't fully get it and lost interest.

Then he started telling me about this other technology called Groovy on Grails and how it ran on the JVM. I had heard about it before but having heard about other things like JRuby, Trails, Sails etc. I figured it was another run of the mill framework.

I think I may have been having a slack one that day at work so I decided to do some surfing and read a bit about Groovy. Within an hour I had ran through the basic tutorial and had progressed to looking at Grails and before the next hour I had a Grails web application up and running. Never before had I used a language or framework so concise, easy to learn, fast to develop and easy to test. Existing Java could also be called seamlessly from Groovy code!. On top of all this there were the Grails plugins, solving seemingly every problem that I had tried and failed to solve myself umpteen times before. Finding out that Spring were firmly behind Grails was the final proof I needed.

Since then I discovered the other Groovy framework called Griffon which is used for building Swing apps. This framework is so good is almost makes a mockery out of the way Swing apps have been built in the past - I mean its logical for a start.

It seems everything, anything, done in Groovy is just so much more concise and simple compared to Java.

So, although I'm not a full Groovy, Grails or Griffon expert yet, I feel that with my knowledge of them so far that I have three great frameworks in my developer toolbox that will allow me to develop great web or desktop applications in a fraction of the time or lines code than ever before.

I intend to use this blog to chart my experiences with Groovy in the future months, please tune in form time to time...


Create a free website with Weebly