Monday, October 19, 2009

Saros Pair Programming Plugin for Eclipse

Saros is a pretty impressive open source plugin for Eclipse that allows collaborative editing (i.e., pair programming). It requires only a Jabber server. Check out this 11 minute video of Saros.

Saturday, October 17, 2009

Java Beans without getters/setters using lombok

Project Lombok is probably going to be one of the most useful library for Java. The library (requires Java 1.6) provides annotations that generate getters, setters, toString, hashCode, & equals for your POJOs. For example:
@Data // Lombok annotation
public class Person {
private String firstName;
private String lastName;

// Now your class has all the getters, setters,
// equals(), hashCode(), and toString()
C#/.NET has had this syntactic sugar built into the language for years but I was ambivalent about the approach. I'm more of a fan of languages with sparse syntax set such as C but the downside is that you end up writing much more boilerplate code. I think Lombok's approach is a nice compromise between bloated language feature set and having verbose code because of sparse language feature set. And it's supposedly supported in Eclipse.

Tuesday, October 6, 2009

Integration testing with Spring

Watch this Rod Johnson talk if you're not already familiar with rolling back transaction as a means of performing integration tests:

You can probably skip to the 30 minute mark if you're already familiar with the reasons for testing.