[jboss-user] [JBoss Seam] - Re: Web Beans Sneak Peek
gavin.king@jboss.com
do-not-reply at jboss.com
Mon Nov 5 23:44:21 EST 2007
anonymous wrote : My argument against the @Named annotation wasn't about the number of extra key strokes (as you pointed out, there is only one!) I was merely saying that to me, if you say that a component has a name, it would make more sense that it has a "name" attribute, not a separate annotation. Are you saying that because many annotations have to share common attributes that those common attributes should be turned into individual annotations just so you don't have to repeat them on each one? Take the @Stateless and @Stateful annotation. Are you saying that the EJB 3 spec is wrong in having duplicated the set of attributes they have in them?
Yes, I think that was a mistake. If I'm writing code that needs to discover the name of an EJB, it would be *much* better if there was just one annotation to look for. If annotation inheritance was supported, it would not be a problem, we could have @Stateless and @Stateful both extend @EJBComponent, and it might be OK.
It's even worse in Web Beans, where component types can be defined by the user.
When people see annotations, they start to forget all their OO modeling knowledge, for some reason. Try to think in terms of modeling and typesafety.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102065#4102065
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102065
More information about the jboss-user
mailing list