Pure Danger Tech


navigation
home

Annotations as language

18 Jan 2008

I was just reading Mike’s post on software electricians. My gut response was that it’s not weird at all to be working primarily on tweaking annotations in a heavily frameworked Java app these days. In fact, I wouldn’t even agree in this case that the annotations are extra-syntacticular (according to the Webster definition). :)

Rather, I would say that the annotations used in the project form the language of the application. Some might call it a DSL. I wouldn’t, although I think that has the right connotations. Those annotations are likely more or as important than the code they annotate. I think that’s an interesting way to write an app. I’m not sure I’d like it, but I’d be willing to give it a shot.

I remember reading some post back when annotations were freshly released talking about experience using similar constructs in Smalltalk (IIRC). He was advocating judicious use of annotations because otherwise you build an application-specific dialect that can only be understood if you’re are an expert in your particular app. He had been down that path and found it ultimately problematic and come back to a more moderate use of annotations.

Now, the app Mike describes is actually based on some fairly widespread and standard annotations, so is probably not unapproachable for someone new to the project, but it certainly seems like the “wiring” is maybe serving as more than just wiring to me.