The Artima Developer Community
Sponsored Link

Java Buzz Forum
Scared of annotation hell

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
dion

Posts: 5028
Nickname: dion
Registered: Feb, 2003

Dion Almaer is the Editor-in-Chief for TheServerSide.com, and is an enterprise Java evangelist
Scared of annotation hell Posted: Jul 2, 2004 8:45 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by dion.
Original Post: Scared of annotation hell
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Latest Java Buzz Posts
Latest Java Buzz Posts by dion
Latest Posts From techno.blog(Dion)

Advertisement
I am a little bit worried about these annotations. I am worried about two things: Annotation Hell This has nothing to do with the technology, rather how it will be abused. I was looking at some code that came from BEA's WebLogic Workshop. The source code was using Controls and such.... and the ration of code to annotations was about 1:10. This doesn't seem right. We have been seeing this for awhile via XDoclet, and the .NET community is definitely seeing it. I dunno, maybe it is just me, but it scares me. We need to get out some practices for what should be in annotations, and really hope specs will not do crazy things which have you nesting them 5 times. Coupling of information to source code Why do we suddenly have to put everything in source code? Does it really make sense to hard code a table name there? If the schema changes we have to recompile code? Deployment descriptors themselves are NOT intrinsically evil. Angle brackets are also not evil. It was how we were using them that was bad. This scares me: @ManyToMany(cascade=CREATE) @AssociationTable( table=@Table(name="EMP_PROJ"), joinColumns= @JoinColumn(name="EMP_ID", referencedColumnName="ID"), inverseJoinColumns= @JoinColumn(name="PROJ_ID", referencedColumnName="ID") ) public Collection getProjects() { return projects; } public void setProjects(Collection projects) { this.projects = projects; } We need to think about what really is deployment time information, and what makes sense to be in the source code. The things that I want in annotations are items that make me understand the code better.

Read: Scared of annotation hell

Topic: Re: tablet PC Previous Topic   Next Topic Topic: Deja Vu JavaOne Keynote?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use