A thing I was playing with today was many-to-many relationships in Grails to create a Tag Cloud. To create a Tag Cloud, I must have a set of key/value pairs, each with a label and a value of the label, which could look like this:

['Java': 5, 'Grails': 16, 'Groovy': 12]

But to query this, I need to query a many to many relationship and produce the above result. This blog will describe how to do this with HQL, Criteria and the HibernateCriteriaBuilder.
(more...)

Powerful Groovy

Posted by Lars Vonk mid-afternoon: May 25, 2008

For my current assignment I need to write a script that basically does the following: open war file, download and add files from internet, remove files, change xml and property files, re-package war file.

In pure Java, this would be quite some work to implement. Of course there are several libraries available that will make unzipping, downloading etc a bit easier. But still it would be too much effort for such trivial tasks.

Since it is in fact a script I want to create, why not use a scripting language like Groovy. After two days of coding I must say am very happy with the progress I made given the fact that it is actually my first real Groovy programming experience.

Here are some experiences and code I created so far:
(more...)

JavaOne 2008 Day Three

Posted by Erik Jan de Wit in the early morning: May 9, 2008

Today was the third day of the conference. Another couple of hours to go and then it is all over again. The fatigue is kicking in, and we're starting to run on reserve power. The topics of today included:

  • Mylyn
  • Groovy
  • Semantic Web
  • SOA
  • OSGi

(more...)

JavaOne 2008 Day Two

Posted by Jeroen van Erp mid-morning: May 8, 2008

Today was the second day of the JavaOne 2008. Besides doing a lot of chatting in the JavaOne pavillion, and visiting all the cool parties this night, we also went to a number of sessions. Also today the NLJug had the James Gosling meeting we won for being the biggest JUG out here. After a long day of work, we finally had time to relax at the Adobe party and at the SDN party.

Todays topics included:

  • Closures
  • JavaFx, Groovy and Google Android
  • Swing GUI testing
  • Scripting

(more...)

Helpful error messages in Grails

Posted by Erik Pragt around lunchtime: May 4, 2008

Currenttly, I'm in the process of building a Grails application. While I've built several prototypes/quick hacks, this is actually the first 'real' application I'm building. "So", I thought, "if this is a real application, I'm in need of some real tests!". When you're in the normal flow of developing a Grails application, everything goes so fast, you almost forget about writing the tests. So I decided to do it a bit differently, and do it just like in Java: do it TDD!
(more...)

JavaOne 2008 Scripting preview

Posted by Jeroen van Erp at around evening time: March 13, 2008

The biggest Java event of the year is coming up again, the JavaOne. For me this is a place of inspiration. Seeing the newest technologies in action and talking to some of the great minds in the Java world, how can one not become inspired!
(more...)

Using Groovy in the real world?

Posted by Erik Pragt in the wee hours: January 9, 2008

XKE

Tonight, we organized our biweekly XKE (Xebia Knowledge Exchange), which is a forum where we update each other on interesting developments or have discussions on various topics.

One of the topics of tonight was: "what keeps us programming in Java"? The underlying thought about it was: what prevents us from programming in a different language, especially a dynamic language like Ruby on Groovy. Because I'm a little more into Groovy than I am into Ruby, I'll talk the rest of the blog about Groovy, but you can probably exchange it for any (dynamic) language.

One of the key factors (and this might sound like an open door) to stick to programming in Java is that we are all very familiar with the language. We have invested time learning it, we know the frameworks, and we have real experience that it works. Furthermore, people know how to manage a Java application, know how to deploy it on an application server, and as an added bonus, IDE's support Java really well.
(more...)

Combining Groovy and Java

Posted by Erik Pragt around lunchtime: December 25, 2007

Combining Groovy and Java

Everybody refactors (I hope). But what if your standard refactoring just isn’t good enough? Take the next step in refactoring into Groovy code and see how easy it is to integrate Groovy into your existing Java projects.

(more...)