Friday, March 19, 2010

groovyConsole

Lately I've taken to using the Groovy Console for all
kinds of little interactive debugging and prototyping
tasks, like working out the syntax of a regular expression
or the sequence of calls to do something with a
Calendar object. How did I ever live without this?
It's incredibly fast compared to writing a test program,
compiling it, running it, repeat...

Thursday, March 11, 2010

JMockit

Using JMockit and this technique, for the first time since I
got interested in unit testing and TDD, I feel confident of
being able to write a unit test for absolutely anything.
Most frameworks don't support mocking final classes
and methods, static methods, constructors... but
JMockit seems to do it all. Unfortunately, so far I haven't
been able to get JMockit working in Groovy. JMockit
uses anonymous inner classes. Groovy uses closures
instead. In most ways closures are better but the lack
of anonymous inner classes does seem to create a
compatibility issue with JMockit.

Friday, March 5, 2010

Spring Roo

Article about Spring Roo at JavaLobby

I think I understand better now what Spring Roo is for. My first reaction
was 'Huh? What do we need this for? Grails does the same thing.'
Roo deals with all the configuration that is one of the biggest costs of
working in Spring, without requiring you to commit to a whole different
framework (Groovy/Grails).

Monday, March 1, 2010

Groovy

I used Groovy at work today. Bwahahahaha. I used it to write
a JUnit test for a private method. I'd have started doing this a
long time ago if I'd realized how easy it would be. It took maybe
half an hour to set everything up.