[xwiki-devs] [VOTE] Use @Named (and @Qualifier annotations later on) for specifying component role
Hi devs, I'd like to propose to deprecate the "value" and "hints" fields of @Component and instead use the @Named annotation (and @Qualifier annotations later on). The rationale is to align with JSR330's @Named annotation at injection points and also to start going in the direction of CDI (JSR299) since CDI uses @Named for beans too. Example before: @Component("hint") public class MyComponent... After: @Component @Named("hint") public class MyComponent Here's my +1 Thanks -Vincent
On Wed, Mar 30, 2011 at 14:28, Vincent Massol <[email protected]> wrote:
Hi devs,
I'd like to propose to deprecate the "value" and "hints" fields of @Component and instead use the @Named annotation (and @Qualifier annotations later on).
The rationale is to align with JSR330's @Named annotation at injection points and also to start going in the direction of CDI (JSR299) since CDI uses @Named for beans too.
Example before:
@Component("hint") public class MyComponent...
After:
@Component @Named("hint") public class MyComponent
Is @Component really required in that case ? Do we have to explicitly use @Named("default") for default hint ?
Here's my +1
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
+1 for anything going in the direction of using JSR330 -- Thomas Mortagne
On Mar 30, 2011, at 2:37 PM, Thomas Mortagne wrote:
On Wed, Mar 30, 2011 at 14:28, Vincent Massol <[email protected]> wrote:
Hi devs,
I'd like to propose to deprecate the "value" and "hints" fields of @Component and instead use the @Named annotation (and @Qualifier annotations later on).
The rationale is to align with JSR330's @Named annotation at injection points and also to start going in the direction of CDI (JSR299) since CDI uses @Named for beans too.
Example before:
@Component("hint") public class MyComponent...
After:
@Component @Named("hint") public class MyComponent
Is @Component really required in that case ?
Yes we still need to discover component declarations.
Do we have to explicitly use @Named("default") for default hint ?
No. CDI says that @Default annotations are not required.
Here's my +1
Thanks -Vincent
+1 for anything going in the direction of using JSR330
-- Thomas Mortagne
Thanks -Vincent
On Wed, Mar 30, 2011 at 14:41, Vincent Massol <[email protected]> wrote:
On Mar 30, 2011, at 2:37 PM, Thomas Mortagne wrote:
On Wed, Mar 30, 2011 at 14:28, Vincent Massol <[email protected]> wrote:
Hi devs,
I'd like to propose to deprecate the "value" and "hints" fields of @Component and instead use the @Named annotation (and @Qualifier annotations later on).
The rationale is to align with JSR330's @Named annotation at injection points and also to start going in the direction of CDI (JSR299) since CDI uses @Named for beans too.
Example before:
@Component("hint") public class MyComponent...
After:
@Component @Named("hint") public class MyComponent
Is @Component really required in that case ?
Yes we still need to discover component declarations.
I mean if it's just for discovering we could change the test on @Component to check @Component || @Named
Do we have to explicitly use @Named("default") for default hint ?
No.
CDI says that @Default annotations are not required.
Here's my +1
Thanks -Vincent
+1 for anything going in the direction of using JSR330
-- Thomas Mortagne
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On Mar 30, 2011, at 2:49 PM, Thomas Mortagne wrote:
On Wed, Mar 30, 2011 at 14:41, Vincent Massol <[email protected]> wrote:
On Mar 30, 2011, at 2:37 PM, Thomas Mortagne wrote:
On Wed, Mar 30, 2011 at 14:28, Vincent Massol <[email protected]> wrote:
Hi devs,
I'd like to propose to deprecate the "value" and "hints" fields of @Component and instead use the @Named annotation (and @Qualifier annotations later on).
The rationale is to align with JSR330's @Named annotation at injection points and also to start going in the direction of CDI (JSR299) since CDI uses @Named for beans too.
Example before:
@Component("hint") public class MyComponent...
After:
@Component @Named("hint") public class MyComponent
Is @Component really required in that case ?
Yes we still need to discover component declarations.
I mean if it's just for discovering we could change the test on @Component to check @Component || @Named
We could but I don't like it too much since it's uneven. @Named doesn't semantically means it's a component. What I'd prefer is find out how CDI impl do it and do the same (since they don't need any annotation for Roles and Components). Thanks -Vincent
Do we have to explicitly use @Named("default") for default hint ?
No.
CDI says that @Default annotations are not required.
Here's my +1
Thanks -Vincent
+1 for anything going in the direction of using JSR330
-- Thomas Mortagne
Thanks -Vincent
On 03/30/2011 02:28 PM, Vincent Massol wrote:
Hi devs,
I'd like to propose to deprecate the "value" and "hints" fields of @Component and instead use the @Named annotation (and @Qualifier annotations later on).
The rationale is to align with JSR330's @Named annotation at injection points and also to start going in the direction of CDI (JSR299) since CDI uses @Named for beans too.
Example before:
@Component("hint") public class MyComponent...
After:
@Component @Named("hint") public class MyComponent
Here's my +1
+1. Will the old mechanism continue to work for a while, for backwards compatibility? -- Sergiu Dumitriu http://purl.org/net/sergiu/
On Mar 30, 2011, at 2:48 PM, Sergiu Dumitriu wrote:
On 03/30/2011 02:28 PM, Vincent Massol wrote:
Hi devs,
I'd like to propose to deprecate the "value" and "hints" fields of @Component and instead use the @Named annotation (and @Qualifier annotations later on).
The rationale is to align with JSR330's @Named annotation at injection points and also to start going in the direction of CDI (JSR299) since CDI uses @Named for beans too.
Example before:
@Component("hint") public class MyComponent...
After:
@Component @Named("hint") public class MyComponent
Here's my +1
+1. Will the old mechanism continue to work for a while, for backwards compatibility?
Sure. It's only about marking it deprecated. Thanks -Vincent
+1 @Named. 0 for switching to @Qualifier, IMO we should sniff the wind and find out if people are generally choosing @Named or @Qualifier. Superior technology doesn't help much if the rest of the world abandons it. Caleb On 03/30/2011 08:28 AM, Vincent Massol wrote:
Hi devs,
I'd like to propose to deprecate the "value" and "hints" fields of @Component and instead use the @Named annotation (and @Qualifier annotations later on).
The rationale is to align with JSR330's @Named annotation at injection points and also to start going in the direction of CDI (JSR299) since CDI uses @Named for beans too.
Example before:
@Component("hint") public class MyComponent...
After:
@Component @Named("hint") public class MyComponent
Here's my +1
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
+1 Thanks, Marius On 03/30/2011 03:28 PM, Vincent Massol wrote:
Hi devs,
I'd like to propose to deprecate the "value" and "hints" fields of @Component and instead use the @Named annotation (and @Qualifier annotations later on).
The rationale is to align with JSR330's @Named annotation at injection points and also to start going in the direction of CDI (JSR299) since CDI uses @Named for beans too.
Example before:
@Component("hint") public class MyComponent...
After:
@Component @Named("hint") public class MyComponent
Here's my +1
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
+0 Denis On Wed, Mar 30, 2011 at 15:17, Marius Dumitru Florea < [email protected]> wrote:
+1
Thanks, Marius
On 03/30/2011 03:28 PM, Vincent Massol wrote:
Hi devs,
I'd like to propose to deprecate the "value" and "hints" fields of @Component and instead use the @Named annotation (and @Qualifier annotations later on).
The rationale is to align with JSR330's @Named annotation at injection points and also to start going in the direction of CDI (JSR299) since CDI uses @Named for beans too.
Example before:
@Component("hint") public class MyComponent...
After:
@Component @Named("hint") public class MyComponent
Here's my +1
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO
participants (6)
-
Caleb James DeLisle -
Denis Gervalle -
Marius Dumitru Florea -
Sergiu Dumitriu -
Thomas Mortagne -
Vincent Massol