I do not have much to say apart from the what the title of this post says.
I do not like annotations as a way of weaving code for an application at all.
XML’s are bearable, but looking at an annotated code, is like looking at hardcoded values as if they are all string literals.
The reason I prefer XML over annotations is atleast they keep the configuration part staked away seperately or is it just me who does not like overloaded contexts?
Here’s the real motivation:
The OO paradigm was there to do the abstraction right, by punctuating them with annotations, we miss the broader general rule of why the object maping was done initally.
Let’s Keep the principle Simple!
Once upon a time there was a Q&A that happened as follows…
Q:So when can you say that your local dev environment is ready?
A:When you have run a comprehensive unit test, pre-existing or drafted yourself.
Q:What is a comprehensive unit test?
A:One that covers all major components of the architecture you are working on.
Q:What can be the major components of an architecture, one may be working on?
A:Layer Code, deployment, DB, Jndi context, orm context, 3rd party API context.
Q:What’s your point?
A:You environment ain’t ready until all your environments are not accessible from your box. The best way to ensure this is with a unit test and know thy environment!