Explicit and Implicit Metadata

by Norbert Ehreke

In the current edition of iX, a German IT magazine, Kent Beck is interviewed about JUnit 4. A statement about using annotations got me thinking. He was asked this question (roughly translated). Q. You have changed the entire architechture of JUnit 4. What was the primary reason for doing this? Were it the features of Java 5 or other testing frameworks? A. The primary inspiration came from NUnit. In hindsight, we understood that the naming conventions in earlier versions of JUnit were, in fact, a simple form of metadata. Making this metadata available explicitly via annotations simplifies the API and helps IDEs creating test support.

Interpreting this statement in a broader sense we come to the differentation of explicit and implicit metadata in general. Annotations are, as Kent stated, the explicit form of metadata, while conventions are the implicit ones. The implications are interesting. Annotations have been received with a lot of criticism. (I might be wrong, but it seems much more so in the Java community compared to the C# community. Again, I might be wrong, but Microsoft developers seem to be less critical of what is decided in the big white tower of wisdom than Java developers. One of the reasons why I feel more like a Java guy.)

As used in JUnit and other frameworks, I see annotations as glue between two or more systems. While explicit metadata in form of annotations is generic glue, implict metadata is industry strengh super glue. It is stronger, but makes the connection more brittle.

3 Comments

Hasko Heinecke
2006-05-22 04:53:31
What issue of iX would that be? I didn't find it in the table of contents on their website.
Hasko Heinecke
2006-05-22 05:05:50
Found it.
Sciencyascede
2008-05-29 18:37:59

Look at this...