Friday, April 22, 2005

Groovy Scripting Language is groovy

Most people know professionally I mostly do java/J2EE server programming. At my current job, we are writing a server that needs to have pluggable functionality. Different clients may want different things based on their current process. I began to think this is a great job for a scripting language. However, we still want to maintain platform independence (great selling point). So I started looking for a java scripting languages. Groovy caught my eye mostly for its ability to be called inside and outside of compiled java code and the fact they will be JSR. After playing around with it I really like it and I think it will be a great fit for what we are trying to do. The language is filled with dynamic features like closures, regex, sql, xml and blocks. Plus you can actually extend it into a language that could be published to clients (much like Adobe CS does with their scripting plugins). So now when a client requests a specific feature for their site, we could just write a groovy script and upload it to the server, no code forking or special releases. I think that is very powerful. Below is my first groovy script, the famous and very complicated, Hello World (and I print out any command line args).



// my hello world stuff
println "Hello, World"
for ( arg in this.args )
{
println "Argument: $arg"
}

One of the cools things about Groovy is that it supports Closure and blocks, so I could do the above for loop like this



this.args.each { arg -> println "Argument ${arg} " }

Arg is just a java List, which I’m able to traverse in some pretty cool ways now.

If you use java code, you should really check out Groovy.


Wednesday, April 06, 2005

Lady Bears National Champs!!!!!

Most people know that Kerry and I went to Baylor University for our undergrads. Well, last night the Lady Bears basketball team won the National Championships! And they just didn’t beat, they dominated Michigan State the entire game! The courtside band was there and hearing some of the tunes brought back memories. I have to admit, I really miss Baylor and the people there.


Go to Baylor Bears Sports for more information on the game.