Java annotation: Difference between revisions

Content deleted Content added
Stagalj (talk | contribs)
Stagalj (talk | contribs)
Line 28:
 
==Impact and Perception==
===Pros===
; Declarative programming : Annotations allow the programmer to declare in their source code how the software should behave. It is an example of how declarative programming constructs can be added to an object oriented language.
 
;The Declarativemain programmingadvantage of the annotations is seen in their declarativeness: Annotations allow the programmer to declare in their source code how the software should behave. It is an example of how declarative programming constructs can be added to an object oriented language.
===Cons===
 
; Performance : Adding metadata to a run time causes additional memory overhead.
Robin Sharp, in his article [http://www.softwarereality.com/programming/annotations.jsp Annotations: Don't Mess with Java], says: ''Annotations are a major kludge on the landscape. They don't fit and we don't need them; but you just know that they'll be picked up by framework junkies and abused horribly.''
; Standards lack : There are few standards that dictate what metadata tags should be used.
 
On the other hand - other authors disagreed:
 
Andrey Grebnev says in [http://www.indicthreads.com/news/285/using_java_annotations.html Java developers don't want Java annotations?]that Java annotations is the future. In the same article, Jesper Joergensen of BEA told us that "Apache Beehive stores the wiring metadata and other metadata as JDK 5 annotations in the code"
 
Anil Saldhana of JBoss continues (the same article): "Combined with JDK 1.5 Annotations, aspects (AOP) also is a great way to expand the Java language in a clean pluggable way rather than using annotations solely for code generation.
 
==See also==