You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@dubbo.apache.org by Mercy <me...@apache.org> on 2019/02/28 09:17:56 UTC

[Discussion] Should we rename the Dubbo's Java anntations with "Dubbo" prefix?

Hi all,


     It's an interesting issue[1] that was posted on Dubbo Spring Boot 
Project, the reporter ask to rename the Dubbo's Java anntations with 
"Dubbo" Prefix:

Before:

     @Service

     @Reference

After:

     @DubboService

     @DubboReference


I think that's fine, What's your opinion?


[1]: 
https://github.com/apache/incubator-dubbo-spring-boot-project/issues/447


Kind regards,

Mercy Ma


Re: 回复:[Discussion] Should we rename the Dubbo's Java anntations with"Dubbo" prefix?

Posted by Ian Luo <ia...@gmail.com>.
Yunkun gives a solid reason which happens in my mind too. Here's one side
question, no matter how we rename, we need to consider the backward
compatibility. Mercy, do you have any plan on this to share with us?

Thanks,
-Ian.


On Fri, Mar 1, 2019 at 10:14 AM YunKun Huang <hy...@apache.org> wrote:

> +1 for rename with prefix
>
> Service annotation is used by Spring Framework. We can use prefix to make
> things more clear to understand and easy to investigate issue.
>
> Of course, we can make sure everything still works with `wrong` import,
> but I think rename with prefix will be more easy to achieve.
>
> On 2019/03/01 01:56:22, LiZhenNet <li...@gmail.com> wrote:
> > I think it is necessary ,Code will be more clearer and will not be
> confused
> > with other annotations , like @Service in Spring
> >
> >
> > kezhenxu94 <ke...@163.com> 于2019年3月1日周五 上午8:56写道:
> >
> > > > Classes in different frameworks have identical names is widespread.
> For
> > > example, java nio and netty both have Channel class.
> > >
> > >
> > > I think it's ok for classes because if you import the class from a
> wrong
> > > package, it's usually a compile time error,
> > > but for annotations, it's not the case.
> > >
> > >
> > > Another example is com.google.inject.Inject (in Guice) and
> > > javax.inject.Inject, but Guice supports the both annotation classes,
> > > meaning it works well event if you import the "wrong" class, but
> importing
> > > the wrong "Service" may be tricky to debug?
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > 在 2019-02-28 23:05:02,"Taosheng, Wei" <we...@foxmail.com> 写道:
> > > >I think it is not necessary. If a shorter name can express its meaning
> > > clearly, we do not need to make it longer.
> > > >Classes in different frameworks have identical names is widespread.
> For
> > > example, java nio and netty both have Channel class.
> > > >
> > > >
> > > >
> > > >
> > > >------------------ 原始邮件 ------------------
> > > >发件人: "Mercy"<me...@apache.org>;
> > > >发送时间: 2019年2月28日(星期四) 下午5:17
> > > >收件人: "dev"<de...@dubbo.apache.org>;
> > > >主题: [Discussion] Should we rename the Dubbo's Java anntations
> with"Dubbo"
> > > prefix?
> > > >
> > > >
> > > >
> > > >Hi all,
> > > >
> > > >
> > > >     It's an interesting issue[1] that was posted on Dubbo Spring Boot
> > > >Project, the reporter ask to rename the Dubbo's Java anntations with
> > > >"Dubbo" Prefix:
> > > >
> > > >Before:
> > > >
> > > >     @Service
> > > >
> > > >     @Reference
> > > >
> > > >After:
> > > >
> > > >     @DubboService
> > > >
> > > >     @DubboReference
> > > >
> > > >
> > > >I think that's fine, What's your opinion?
> > > >
> > > >
> > > >[1]:
> > > >
> https://github.com/apache/incubator-dubbo-spring-boot-project/issues/447
> > > >
> > > >
> > > >Kind regards,
> > > >
> > > >Mercy Ma
> > >
> >
>

Re: ���������[Discussion] Should we rename the Dubbo's Java anntations with"Dubbo" prefix?

Posted by YunKun Huang <hy...@apache.org>.
+1 for rename with prefix

Service annotation is used by Spring Framework. We can use prefix to make things more clear to understand and easy to investigate issue.

Of course, we can make sure everything still works with `wrong` import, but I think rename with prefix will be more easy to achieve.

On 2019/03/01 01:56:22, LiZhenNet <li...@gmail.com> wrote: 
> I think it is necessary ,Code will be more clearer and will not be confused
> with other annotations , like @Service in Spring
> 
> 
> kezhenxu94 <ke...@163.com> 于2019年3月1日周五 上午8:56写道:
> 
> > > Classes in different frameworks have identical names is widespread. For
> > example, java nio and netty both have Channel class.
> >
> >
> > I think it's ok for classes because if you import the class from a wrong
> > package, it's usually a compile time error,
> > but for annotations, it's not the case.
> >
> >
> > Another example is com.google.inject.Inject (in Guice) and
> > javax.inject.Inject, but Guice supports the both annotation classes,
> > meaning it works well event if you import the "wrong" class, but importing
> > the wrong "Service" may be tricky to debug?
> >
> >
> >
> >
> >
> >
> >
> >
> > 在 2019-02-28 23:05:02,"Taosheng, Wei" <we...@foxmail.com> 写道:
> > >I think it is not necessary. If a shorter name can express its meaning
> > clearly, we do not need to make it longer.
> > >Classes in different frameworks have identical names is widespread. For
> > example, java nio and netty both have Channel class.
> > >
> > >
> > >
> > >
> > >------------------ 原始邮件 ------------------
> > >发件人: "Mercy"<me...@apache.org>;
> > >发送时间: 2019年2月28日(星期四) 下午5:17
> > >收件人: "dev"<de...@dubbo.apache.org>;
> > >主题: [Discussion] Should we rename the Dubbo's Java anntations with"Dubbo"
> > prefix?
> > >
> > >
> > >
> > >Hi all,
> > >
> > >
> > >     It's an interesting issue[1] that was posted on Dubbo Spring Boot
> > >Project, the reporter ask to rename the Dubbo's Java anntations with
> > >"Dubbo" Prefix:
> > >
> > >Before:
> > >
> > >     @Service
> > >
> > >     @Reference
> > >
> > >After:
> > >
> > >     @DubboService
> > >
> > >     @DubboReference
> > >
> > >
> > >I think that's fine, What's your opinion?
> > >
> > >
> > >[1]:
> > >https://github.com/apache/incubator-dubbo-spring-boot-project/issues/447
> > >
> > >
> > >Kind regards,
> > >
> > >Mercy Ma
> >
> 

Re: 回复:[Discussion] Should we rename the Dubbo's Java anntations with"Dubbo" prefix?

Posted by LiZhenNet <li...@gmail.com>.
I think it is necessary ,Code will be more clearer and will not be confused
with other annotations , like @Service in Spring


kezhenxu94 <ke...@163.com> 于2019年3月1日周五 上午8:56写道:

> > Classes in different frameworks have identical names is widespread. For
> example, java nio and netty both have Channel class.
>
>
> I think it's ok for classes because if you import the class from a wrong
> package, it's usually a compile time error,
> but for annotations, it's not the case.
>
>
> Another example is com.google.inject.Inject (in Guice) and
> javax.inject.Inject, but Guice supports the both annotation classes,
> meaning it works well event if you import the "wrong" class, but importing
> the wrong "Service" may be tricky to debug?
>
>
>
>
>
>
>
>
> 在 2019-02-28 23:05:02,"Taosheng, Wei" <we...@foxmail.com> 写道:
> >I think it is not necessary. If a shorter name can express its meaning
> clearly, we do not need to make it longer.
> >Classes in different frameworks have identical names is widespread. For
> example, java nio and netty both have Channel class.
> >
> >
> >
> >
> >------------------ 原始邮件 ------------------
> >发件人: "Mercy"<me...@apache.org>;
> >发送时间: 2019年2月28日(星期四) 下午5:17
> >收件人: "dev"<de...@dubbo.apache.org>;
> >主题: [Discussion] Should we rename the Dubbo's Java anntations with"Dubbo"
> prefix?
> >
> >
> >
> >Hi all,
> >
> >
> >     It's an interesting issue[1] that was posted on Dubbo Spring Boot
> >Project, the reporter ask to rename the Dubbo's Java anntations with
> >"Dubbo" Prefix:
> >
> >Before:
> >
> >     @Service
> >
> >     @Reference
> >
> >After:
> >
> >     @DubboService
> >
> >     @DubboReference
> >
> >
> >I think that's fine, What's your opinion?
> >
> >
> >[1]:
> >https://github.com/apache/incubator-dubbo-spring-boot-project/issues/447
> >
> >
> >Kind regards,
> >
> >Mercy Ma
>

Re:回复:[Discussion] Should we rename the Dubbo's Java anntations with"Dubbo" prefix?

Posted by kezhenxu94 <ke...@163.com>.
> Classes in different frameworks have identical names is widespread. For example, java nio and netty both have Channel class.


I think it's ok for classes because if you import the class from a wrong package, it's usually a compile time error,
but for annotations, it's not the case.


Another example is com.google.inject.Inject (in Guice) and javax.inject.Inject, but Guice supports the both annotation classes,
meaning it works well event if you import the "wrong" class, but importing the wrong "Service" may be tricky to debug?








在 2019-02-28 23:05:02,"Taosheng, Wei" <we...@foxmail.com> 写道:
>I think it is not necessary. If a shorter name can express its meaning clearly, we do not need to make it longer.
>Classes in different frameworks have identical names is widespread. For example, java nio and netty both have Channel class.
>
>
>
>
>------------------ 原始邮件 ------------------
>发件人: "Mercy"<me...@apache.org>; 
>发送时间: 2019年2月28日(星期四) 下午5:17
>收件人: "dev"<de...@dubbo.apache.org>; 
>主题: [Discussion] Should we rename the Dubbo's Java anntations with"Dubbo" prefix?
>
>
>
>Hi all,
>
>
>     It's an interesting issue[1] that was posted on Dubbo Spring Boot 
>Project, the reporter ask to rename the Dubbo's Java anntations with 
>"Dubbo" Prefix:
>
>Before:
>
>     @Service
>
>     @Reference
>
>After:
>
>     @DubboService
>
>     @DubboReference
>
>
>I think that's fine, What's your opinion?
>
>
>[1]: 
>https://github.com/apache/incubator-dubbo-spring-boot-project/issues/447
>
>
>Kind regards,
>
>Mercy Ma

回复:[Discussion] Should we rename the Dubbo's Java anntations with"Dubbo" prefix?

Posted by "Taosheng, Wei" <we...@foxmail.com>.
I think it is not necessary. If a shorter name can express its meaning clearly, we do not need to make it longer.
Classes in different frameworks have identical names is widespread. For example, java nio and netty both have Channel class.




------------------ 原始邮件 ------------------
发件人: "Mercy"<me...@apache.org>; 
发送时间: 2019年2月28日(星期四) 下午5:17
收件人: "dev"<de...@dubbo.apache.org>; 
主题: [Discussion] Should we rename the Dubbo's Java anntations with"Dubbo" prefix?



Hi all,


     It's an interesting issue[1] that was posted on Dubbo Spring Boot 
Project, the reporter ask to rename the Dubbo's Java anntations with 
"Dubbo" Prefix:

Before:

     @Service

     @Reference

After:

     @DubboService

     @DubboReference


I think that's fine, What's your opinion?


[1]: 
https://github.com/apache/incubator-dubbo-spring-boot-project/issues/447


Kind regards,

Mercy Ma

Re: [Discussion] Should we rename the Dubbo's Java anntations with "Dubbo" prefix?

Posted by Ian Luo <ia...@gmail.com>.
Mercy, would you mind to file an issue against this and target it to 3.0
release?

Thanks,
-Ian.

On Thu, Mar 7, 2019 at 8:58 PM jun liu <ke...@gmail.com> wrote:

> +0 to rename.
>
> Agree to rename on 3.0, if we finally decide to do that.
>
> Jun
>
> > On Mar 5, 2019, at 10:07 AM, Ian Luo <ia...@gmail.com> wrote:
> >
> > It is a good idea to rename it in our major release, say 3.0
> >
> > -Ian.
> >
> > On Tue, Mar 5, 2019 at 9:54 AM zhi_guang_liu@163.com <
> zhi_guang_liu@163.com>
> > wrote:
> >
> >> I think it is not a good idea to make so greate change in a small
> version
> >> update.
> >> It will make a question of backward compatibility.
> >>
> >> It can be considered in a big version update such as 2.X to 3.X
> >> but not from 2.7.x to 2.8.x。
> >>
> >> ------------------------------
> >> 您的朋友:刘志广
> >>
> >>
> >> *From:* Mercy <me...@apache.org>
> >> *Date:* 2019-02-28 17:17
> >> *To:* dev <de...@dubbo.apache.org>
> >> *Subject:* [Discussion] Should we rename the Dubbo's Java anntations
> with
> >> "Dubbo" prefix?
> >> Hi all,
> >>
> >>
> >>    It's an interesting issue[1] that was posted on Dubbo Spring Boot
> >> Project, the reporter ask to rename the Dubbo's Java anntations with
> >> "Dubbo" Prefix:
> >>
> >> Before:
> >>
> >>    @Service
> >>
> >>    @Reference
> >>
> >> After:
> >>
> >>    @DubboService
> >>
> >>    @DubboReference
> >>
> >>
> >> I think that's fine, What's your opinion?
> >>
> >>
> >> [1]:
> >>
> https://github.com/apache/incubator-dubbo-spring-boot-project/issues/447
> >>
> >>
> >> Kind regards,
> >>
> >> Mercy Ma
> >>
> >>
> >>
>
>

Re: [Discussion] Should we rename the Dubbo's Java anntations with "Dubbo" prefix?

Posted by jun liu <ke...@gmail.com>.
+0 to rename.

Agree to rename on 3.0, if we finally decide to do that.

Jun

> On Mar 5, 2019, at 10:07 AM, Ian Luo <ia...@gmail.com> wrote:
> 
> It is a good idea to rename it in our major release, say 3.0
> 
> -Ian.
> 
> On Tue, Mar 5, 2019 at 9:54 AM zhi_guang_liu@163.com <zh...@163.com>
> wrote:
> 
>> I think it is not a good idea to make so greate change in a small version
>> update.
>> It will make a question of backward compatibility.
>> 
>> It can be considered in a big version update such as 2.X to 3.X
>> but not from 2.7.x to 2.8.x。
>> 
>> ------------------------------
>> 您的朋友:刘志广
>> 
>> 
>> *From:* Mercy <me...@apache.org>
>> *Date:* 2019-02-28 17:17
>> *To:* dev <de...@dubbo.apache.org>
>> *Subject:* [Discussion] Should we rename the Dubbo's Java anntations with
>> "Dubbo" prefix?
>> Hi all,
>> 
>> 
>>    It's an interesting issue[1] that was posted on Dubbo Spring Boot
>> Project, the reporter ask to rename the Dubbo's Java anntations with
>> "Dubbo" Prefix:
>> 
>> Before:
>> 
>>    @Service
>> 
>>    @Reference
>> 
>> After:
>> 
>>    @DubboService
>> 
>>    @DubboReference
>> 
>> 
>> I think that's fine, What's your opinion?
>> 
>> 
>> [1]:
>> https://github.com/apache/incubator-dubbo-spring-boot-project/issues/447
>> 
>> 
>> Kind regards,
>> 
>> Mercy Ma
>> 
>> 
>> 


Re: [Discussion] Should we rename the Dubbo's Java anntations with "Dubbo" prefix?

Posted by Ian Luo <ia...@gmail.com>.
It is a good idea to rename it in our major release, say 3.0

-Ian.

On Tue, Mar 5, 2019 at 9:54 AM zhi_guang_liu@163.com <zh...@163.com>
wrote:

> I think it is not a good idea to make so greate change in a small version
> update.
> It will make a question of backward compatibility.
>
> It can be considered in a big version update such as 2.X to 3.X
> but not from 2.7.x to 2.8.x。
>
> ------------------------------
> 您的朋友:刘志广
>
>
> *From:* Mercy <me...@apache.org>
> *Date:* 2019-02-28 17:17
> *To:* dev <de...@dubbo.apache.org>
> *Subject:* [Discussion] Should we rename the Dubbo's Java anntations with
> "Dubbo" prefix?
> Hi all,
>
>
>     It's an interesting issue[1] that was posted on Dubbo Spring Boot
> Project, the reporter ask to rename the Dubbo's Java anntations with
> "Dubbo" Prefix:
>
> Before:
>
>     @Service
>
>     @Reference
>
> After:
>
>     @DubboService
>
>     @DubboReference
>
>
> I think that's fine, What's your opinion?
>
>
> [1]:
> https://github.com/apache/incubator-dubbo-spring-boot-project/issues/447
>
>
> Kind regards,
>
> Mercy Ma
>
>
>

Re: [Discussion] Should we rename the Dubbo's Java anntations with "Dubbo" prefix?

Posted by "zhi_guang_liu@163.com" <zh...@163.com>.
I think it is not a good idea to make so greate change in a small version update.
It will make a question of backward compatibility.

It can be considered in a big version update such as 2.X to 3.X
but not from 2.7.x to 2.8.x。



您的朋友:刘志广
 
From: Mercy
Date: 2019-02-28 17:17
To: dev
Subject: [Discussion] Should we rename the Dubbo's Java anntations with "Dubbo" prefix?
Hi all,
 
 
    It's an interesting issue[1] that was posted on Dubbo Spring Boot 
Project, the reporter ask to rename the Dubbo's Java anntations with 
"Dubbo" Prefix:
 
Before:
 
    @Service
 
    @Reference
 
After:
 
    @DubboService
 
    @DubboReference
 
 
I think that's fine, What's your opinion?
 
 
[1]: 
https://github.com/apache/incubator-dubbo-spring-boot-project/issues/447
 
 
Kind regards,
 
Mercy Ma
 

Re: [Discussion] Should we rename the Dubbo's Java anntations with "Dubbo" prefix?

Posted by Huxing Zhang <hu...@apache.org>.
Hi,

I like this thread, typical Apache way!
BTW, +1 to rename to @DubboService looks clearer to me!

On Thu, Feb 28, 2019 at 5:18 PM Mercy <me...@apache.org> wrote:
>
> Hi all,
>
>
>      It's an interesting issue[1] that was posted on Dubbo Spring Boot
> Project, the reporter ask to rename the Dubbo's Java anntations with
> "Dubbo" Prefix:
>
> Before:
>
>      @Service
>
>      @Reference
>
> After:
>
>      @DubboService
>
>      @DubboReference
>
>
> I think that's fine, What's your opinion?
>
>
> [1]:
> https://github.com/apache/incubator-dubbo-spring-boot-project/issues/447
>
>
> Kind regards,
>
> Mercy Ma
>


-- 
Best Regards!
Huxing