Hm... that's a little like programming against interfaces or not. If you do so, then
you can easyly switch the implementation, but you have more "overhead" code and
files. And here your @In annotation "grows", though it's only some chars.
But I always intend to have the smallest and simplest code as possible to make at is
readable and easy to understand as possible. But everything depends on what you prefer
;).
However, I'd like to say something about the JIRA request. IMO
- @In annotations shall be reservered for Seam components (namely those classes annotated
with @Name or @Role), and nothing else. The point is that @In (and @Out, too) has a scope
attribute which is only applicable to Seam components! And EL expressions might represent
a Seam component, but they often don't ;).
- @RequestParameter shall be for request parameters. The name is king (ok, and Gavin, too
*g*).
- And for EL expressions I think it's better to retrieve the concrete objects and
access their accessor methods directly. But ok, dependency injection / inversion of
control is a very nice feature.... so I'd prefer a completely new annotation.
But as I said that's just an opinion ;).
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972035#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...