Val's Blog
Lots of stuff for Web 2.0 freaks and Java addicts
Feeds RSS | Atom | RDF
 
 
Albert Einstein: "Intellectuals solve problems: geniuses prevent them."
[ Login ]

July 2004
SunMonTueWedThuFriSat
     1  2  3 
 4  5  6  7  8  9  10 
 11  12  13  14  15  16  17 
 18  19  20  21  22  23  24 
 25  26  27  28  29  30  31 
Jun  |  Today  |  Aug
XML Feeds   Subscribe with Bloglines

Javaranch Sheriff   My LinkedIn Profile
Drop me a line or two   Bloglines Blogroll
JavaRSS   Referers
How cool are you?   My Reviews

Next trips...
SpringOne 2008 (Jun 11-12, 08)
Ajax Exp. 2008 (Sep 29-Oct 1, 08)
Top 10 entries (#hits)
(As of Nov 30, 2007)


Top 10 entries (#hits/day)
Come Back (5.032)
(As of Nov 30, 2007)
Recent Blog Entries
Recent Blog Comments
Re: Review of "Marketing Management 12th"
i know marketing management by kotler is good book but the problem is that the management part of this book is totally missing as fare as i know managemet is complete different subject and it should not be mixed i am student of MBA i was looking at ass...

Re: Review of "Pro Spring"
Using simple POJOs + factories without Spring for "echo" and "counter" would be a lot more easier. No need to write those XML files... So, in this case using Spring makes me write a lot more code... (OK, you can generate everything with the help of And...

pls urgent
Hi I am trying to generate the word doc but i m not understanding wats happening any one pls figure it out /* * WordAPI.java * * Created on May 30, 2006, 10:50 AM * * To change this template, choose Tools | Template Manager * and open the te...
Archives (# entries)
Links
Other Blogs
Other Blogs

Reviewing
Reading
Locations of visitors to this page
What they once said...
 

Whether you like it or not, annotations are making there way into the Java language. The EJB expert group has identified the potential gain annotations could bring to EJBs by devising new ways of developing enterprise beans using one single file that would contain all the necessary information needed by the container to make the bean work properly. The goal of the new spec is to simplify the development of EJBs by eliminating the hassle of explicitely having to create home and component interfaces as well as deployment descriptors. While this somehow makes sense, I have already exposed my views on the subject in a previous blog entry.

Today, Cédric Beust proposes a mechanism for allowing future developers to override annotations at deployment time. In my opinion, the idea is worth spending some time on it. What puzzles me somewhat is that Cédric proposes to specify all the overriding behavior in... an ad-hoc XML file that could be loaded dynamically by some AnnotationOverrider. Sorry but this smells big time!!

I'm aware that overriding annotations would only have to be done in few special cases and that not everybody would have to use that mechanism, but having to specify the overriding mechanism in an XML file would somehow defeat one the primary goals for which annotations have been brought up in the first place, literally "to replace the various ad hoc metadata facilities in use today".

What I see coming is that people will start consuming annotations as they consume normal Java code and their source files will end up being incredibly cluttered with both code and metadata, which I legitimately called the "annotation hell syndrom". This will inevitably lead to unmaintainable source files, exactly what the solution was originally supposed to prevent from happening.

Although not always ideal, the original idea behind deployment descriptors was viable as they made it easier to assemble/deploy/redeploy enterprise applications without having to rebuild the whole code base. In the future, we will have to rebuild/deploy the whole stuff whenever someone changes metadata since annotations will be tightly coupled with the code they describe. I don't reject annotations, I think they can be very powerful, I'm just skeptical about whether we will be able to use them correctly or not.

Again, I think that tool builders have some homework to do in order to provide developers with cutting-edge tools that hide much of the complexity related to the issues I mentioned. If tool builders fail to create new tools that help developers manage this complexity, we will have a hard time developing complex applications in the future.

 
About this Blog