Posts tagged ‘Groovy and Grails’
Groovy is a language that has a syntax that’s similar to, yet simpler than, Java. It’s often referred to as a scripting/agile/dynamic language, but I would prefer to stay away from these adjectives as I feel they only end up confusing things. If Java is a wise middle-aged man, Groovy is his teenage son. Groovy has many of the old man’s characteristics but is a lot wilder and a lot more fun. Both of them also work together very well.
Groovy has a lot fewer rules than Java. For example, in Java to get the standard “Hello World” output, you need to write a class, a main method with proper arguments, and more. But in Groovy, if you don’t wish to write all the boilerplate code, you can get rid of the class definition and the main method and just write the one line of code that actually prints “Hello World.”