You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Nicolas Malin <ni...@nereide.fr> on 2017/08/04 20:04:32 UTC

Rule to deprecated a service

Hello with the thread 
https://lists.apache.org/thread.html/Zoz5yfpkrfcxts1 and the voluntary 
to have a good coherence on crud service name,

I would be have your suggest to manage old name and deprecated process.

I review the issue OFBIZ-9550 [1] that contains this problematic :

-    <service name="addPromoToMarketingCampaign" ...
+    <service name="createMarketingCampaignPromo" ...

Currently I follow this process :

* duplicate the service definition
* Rename the duplicate with the correct name
* Set "DEPRECATED : use ${new service} instead" in the service description
* implement on old service definition : return error("use ${new service} 
instead") to help developer to correct their specific code.

I image that we can create a generic code to return the error and change 
the old service definition like this :

     <service name="addPromoToMarketingCampaign" default-entity-name="MarketingCampaignPromo" engine="deprecated" invoke="create" auth="true">
          <description>Deprecated please replace by createMarketingCampaignPromo</description>
          <auto-attributes include="pk" mode="IN" optional="false"/>
          <auto-attributes include="nonpk" mode="IN" optional="true"/>
      </service>

And deprecated engine return always error with the service description.

After a new ofbiz stable branche creation, we remove all deprecated 
service ?

Any suggests, othet ideas, comments ?

Cheers,

Nicolas

[1] https://issues.apache.org/jira/browse/OFBIZ-9550

--
logoNrd <https://nereide.fr/>
	Nicolas Malin
The apache way <http://theapacheway.com/> : *Openness* Technical 
decisions are made publicly
information@nereide.fr
8 rue des Déportés 37000 TOURS, 02 47 50 30 54

Apache OFBiz <http://ofbiz.apache.org/>|The Apache Way 
<http://theapacheway.com/>|ofbiz-fr <http://www.ofbiz-fr.org/>|réseau LE 
<http://www.libre-entreprise.org/>

Re: Rule to deprecated a service

Posted by Vaibhav Jain <va...@hotwaxsystems.com>.
+1 Nicolas

Thanks & Regards
Vaibhav Jain
Hotwax Systems,
vaibhav.jain@hotwaxsystems.com

On Wed, Aug 9, 2017 at 5:04 PM, Suraj Khurana <
suraj.khurana@hotwaxsystems.com> wrote:

> +1 Nicolas.
>
> --
> Thanks and Regards,
> *Suraj Khurana* | Sr. Enterprise Software Engineer
> HotWax Commerce <http://www.hotwax.co/>  by  HotWax Systems
> <http://www.hotwaxsystems.com/>
> Plot no. 80, Scheme no. 78, Vijay Nagar, Indore, M.P. India 452010
>
>
> On Sat, Aug 5, 2017 at 1:34 AM, Nicolas Malin <ni...@nereide.fr>
> wrote:
>
> > Hello with the thread https://lists.apache.org/
> thread.html/Zoz5yfpkrfcxts1
> > and the voluntary to have a good coherence on crud service name,
> >
> > I would be have your suggest to manage old name and deprecated process.
> >
> > I review the issue OFBIZ-9550 [1] that contains this problematic :
> >
> > -    <service name="addPromoToMarketingCampaign" ...
> > +    <service name="createMarketingCampaignPromo" ...
> >
> > Currently I follow this process :
> >
> > * duplicate the service definition
> > * Rename the duplicate with the correct name
> > * Set "DEPRECATED : use ${new service} instead" in the service
> description
> > * implement on old service definition : return error("use ${new service}
> > instead") to help developer to correct their specific code.
> >
> > I image that we can create a generic code to return the error and change
> > the old service definition like this :
> >
> >     <service name="addPromoToMarketingCampaign"
> > default-entity-name="MarketingCampaignPromo" engine="deprecated"
> > invoke="create" auth="true">
> >          <description>Deprecated please replace by
> > createMarketingCampaignPromo</description>
> >          <auto-attributes include="pk" mode="IN" optional="false"/>
> >          <auto-attributes include="nonpk" mode="IN" optional="true"/>
> >      </service>
> >
> > And deprecated engine return always error with the service description.
> >
> > After a new ofbiz stable branche creation, we remove all deprecated
> > service ?
> >
> > Any suggests, othet ideas, comments ?
> >
> > Cheers,
> >
> > Nicolas
> >
> > [1] https://issues.apache.org/jira/browse/OFBIZ-9550
> >
> > --
> > logoNrd <https://nereide.fr/>
> >         Nicolas Malin
> > The apache way <http://theapacheway.com/> : *Openness* Technical
> > decisions are made publicly
> > information@nereide.fr
> > 8 rue des Déportés 37000 TOURS, 02 47 50 30 54
> >
> > Apache OFBiz <http://ofbiz.apache.org/>|The Apache Way <
> > http://theapacheway.com/>|ofbiz-fr <http://www.ofbiz-fr.org/>|réseau LE
> <
> > http://www.libre-entreprise.org/>
> >
>

Re: Rule to deprecated a service

Posted by Suraj Khurana <su...@hotwaxsystems.com>.
+1 Nicolas.

--
Thanks and Regards,
*Suraj Khurana* | Sr. Enterprise Software Engineer
HotWax Commerce <http://www.hotwax.co/>  by  HotWax Systems
<http://www.hotwaxsystems.com/>
Plot no. 80, Scheme no. 78, Vijay Nagar, Indore, M.P. India 452010


On Sat, Aug 5, 2017 at 1:34 AM, Nicolas Malin <ni...@nereide.fr>
wrote:

> Hello with the thread https://lists.apache.org/thread.html/Zoz5yfpkrfcxts1
> and the voluntary to have a good coherence on crud service name,
>
> I would be have your suggest to manage old name and deprecated process.
>
> I review the issue OFBIZ-9550 [1] that contains this problematic :
>
> -    <service name="addPromoToMarketingCampaign" ...
> +    <service name="createMarketingCampaignPromo" ...
>
> Currently I follow this process :
>
> * duplicate the service definition
> * Rename the duplicate with the correct name
> * Set "DEPRECATED : use ${new service} instead" in the service description
> * implement on old service definition : return error("use ${new service}
> instead") to help developer to correct their specific code.
>
> I image that we can create a generic code to return the error and change
> the old service definition like this :
>
>     <service name="addPromoToMarketingCampaign"
> default-entity-name="MarketingCampaignPromo" engine="deprecated"
> invoke="create" auth="true">
>          <description>Deprecated please replace by
> createMarketingCampaignPromo</description>
>          <auto-attributes include="pk" mode="IN" optional="false"/>
>          <auto-attributes include="nonpk" mode="IN" optional="true"/>
>      </service>
>
> And deprecated engine return always error with the service description.
>
> After a new ofbiz stable branche creation, we remove all deprecated
> service ?
>
> Any suggests, othet ideas, comments ?
>
> Cheers,
>
> Nicolas
>
> [1] https://issues.apache.org/jira/browse/OFBIZ-9550
>
> --
> logoNrd <https://nereide.fr/>
>         Nicolas Malin
> The apache way <http://theapacheway.com/> : *Openness* Technical
> decisions are made publicly
> information@nereide.fr
> 8 rue des Déportés 37000 TOURS, 02 47 50 30 54
>
> Apache OFBiz <http://ofbiz.apache.org/>|The Apache Way <
> http://theapacheway.com/>|ofbiz-fr <http://www.ofbiz-fr.org/>|réseau LE <
> http://www.libre-entreprise.org/>
>

Re: Rule to deprecated a service

Posted by Deepak Dixit <de...@hotwaxsystems.com>.
+1

Thanks Nicolas,

This is inline with what I proposed.

Thanks & Regards
--
Deepak Dixit
www.hotwaxsystems.com
www.hotwax.co

On Sun, Aug 6, 2017 at 10:34 PM, Nicolas Malin <ni...@nereide.fr>
wrote:

> Thanks for your return Deepak and Taher.
>
> I suggested to use comment to deprecated because it's really fast to
> implement with a combination of process and small modification code.
>
> Like Taher, just I found not enough just a comment. What do you think
> about add a new xml element to service
>
> <deprecate replace-by-service="theNewServiceName"> Explain the
> reason</deprecated>
>
> and on the modelService, when a deprecate is parsed and when the service
> is call we put on log a warning :
>
> WARN the service oldServiceName is now deprecated please use
> theNewService, the reason is ${Explain the reason}
>
> Nicolas
>
>
> Le 06/08/2017 à 08:03, Taher Alkhateeb a écrit :
>
>> Hmmm I am not sure if comments are the most appropriate form for
>> deprecation. Usually deprecation is useful when it is programmatic because
>> it goes beyond raw text to logging warnings and highlighting by tools. You
>> want the system to constantly remind you (both the developer and author)
>> to
>> get rid of the deprecated code.
>>
>> However if this entails a lot of code changes (not sure) then I think it
>> might be useful to wait until we refactor the rest of the core components
>> (entity engine, service engine, etc ...)
>>
>> On Aug 6, 2017 8:47 AM, "Deepak Dixit" <de...@hotwaxsystems.com>
>> wrote:
>>
>> Hi Nicolas,
>>>
>>> Idea is to mark service deprecated is looks good to me,
>>> What I think instead of adding deprecated as engine we can set annotation
>>> for deprecated service like we set in java, annotation can be simple
>>> comment or xml annotation.
>>>
>>> And ideally we have to mark services deprecate instead of removing, with
>>> expected release on which we will remove this deprecated code.
>>>
>>>
>>> Thanks & Regards
>>> --
>>> Deepak Dixit
>>> www.hotwaxsystems.com
>>> www.hotwax.co
>>>
>>> On Sat, Aug 5, 2017 at 1:34 AM, Nicolas Malin <ni...@nereide.fr>
>>> wrote:
>>>
>>> Hello with the thread https://lists.apache.org/
>>>>
>>> thread.html/Zoz5yfpkrfcxts1
>>>
>>>> and the voluntary to have a good coherence on crud service name,
>>>>
>>>> I would be have your suggest to manage old name and deprecated process.
>>>>
>>>> I review the issue OFBIZ-9550 [1] that contains this problematic :
>>>>
>>>> -    <service name="addPromoToMarketingCampaign" ...
>>>> +    <service name="createMarketingCampaignPromo" ...
>>>>
>>>> Currently I follow this process :
>>>>
>>>> * duplicate the service definition
>>>> * Rename the duplicate with the correct name
>>>> * Set "DEPRECATED : use ${new service} instead" in the service
>>>>
>>> description
>>>
>>>> * implement on old service definition : return error("use ${new service}
>>>> instead") to help developer to correct their specific code.
>>>>
>>>> I image that we can create a generic code to return the error and change
>>>> the old service definition like this :
>>>>
>>>>      <service name="addPromoToMarketingCampaign"
>>>> default-entity-name="MarketingCampaignPromo" engine="deprecated"
>>>> invoke="create" auth="true">
>>>>           <description>Deprecated please replace by
>>>> createMarketingCampaignPromo</description>
>>>>           <auto-attributes include="pk" mode="IN" optional="false"/>
>>>>           <auto-attributes include="nonpk" mode="IN" optional="true"/>
>>>>       </service>
>>>>
>>>> And deprecated engine return always error with the service description.
>>>>
>>>> After a new ofbiz stable branche creation, we remove all deprecated
>>>> service ?
>>>>
>>>> Any suggests, othet ideas, comments ?
>>>>
>>>> Cheers,
>>>>
>>>> Nicolas
>>>>
>>>> [1] https://issues.apache.org/jira/browse/OFBIZ-9550
>>>>
>>>> --
>>>> logoNrd <https://nereide.fr/>
>>>>          Nicolas Malin
>>>> The apache way <http://theapacheway.com/> : *Openness* Technical
>>>> decisions are made publicly
>>>> information@nereide.fr
>>>> 8 rue des Déportés 37000 TOURS, 02 47 50 30 54
>>>>
>>>> Apache OFBiz <http://ofbiz.apache.org/>|The Apache Way <
>>>> http://theapacheway.com/>|ofbiz-fr <http://www.ofbiz-fr.org/>|réseau LE
>>>>
>>> <
>>>
>>>> http://www.libre-entreprise.org/>
>>>>
>>>>
>

Re: Rule to deprecated a service

Posted by Jacques Le Roux <ja...@les7arts.com>.
+1

Jacques


Le 06/08/2017 à 19:04, Nicolas Malin a écrit :
> Thanks for your return Deepak and Taher.
>
> I suggested to use comment to deprecated because it's really fast to implement with a combination of process and small modification code.
>
> Like Taher, just I found not enough just a comment. What do you think about add a new xml element to service
>
> <deprecate replace-by-service="theNewServiceName"> Explain the reason</deprecated>
>
> and on the modelService, when a deprecate is parsed and when the service is call we put on log a warning :
>
> WARN the service oldServiceName is now deprecated please use theNewService, the reason is ${Explain the reason}
>
> Nicolas
>
>
> Le 06/08/2017 à 08:03, Taher Alkhateeb a écrit :
>> Hmmm I am not sure if comments are the most appropriate form for
>> deprecation. Usually deprecation is useful when it is programmatic because
>> it goes beyond raw text to logging warnings and highlighting by tools. You
>> want the system to constantly remind you (both the developer and author) to
>> get rid of the deprecated code.
>>
>> However if this entails a lot of code changes (not sure) then I think it
>> might be useful to wait until we refactor the rest of the core components
>> (entity engine, service engine, etc ...)
>>
>> On Aug 6, 2017 8:47 AM, "Deepak Dixit" <de...@hotwaxsystems.com>
>> wrote:
>>
>>> Hi Nicolas,
>>>
>>> Idea is to mark service deprecated is looks good to me,
>>> What I think instead of adding deprecated as engine we can set annotation
>>> for deprecated service like we set in java, annotation can be simple
>>> comment or xml annotation.
>>>
>>> And ideally we have to mark services deprecate instead of removing, with
>>> expected release on which we will remove this deprecated code.
>>>
>>>
>>> Thanks & Regards
>>> -- 
>>> Deepak Dixit
>>> www.hotwaxsystems.com
>>> www.hotwax.co
>>>
>>> On Sat, Aug 5, 2017 at 1:34 AM, Nicolas Malin <ni...@nereide.fr>
>>> wrote:
>>>
>>>> Hello with the thread https://lists.apache.org/
>>> thread.html/Zoz5yfpkrfcxts1
>>>> and the voluntary to have a good coherence on crud service name,
>>>>
>>>> I would be have your suggest to manage old name and deprecated process.
>>>>
>>>> I review the issue OFBIZ-9550 [1] that contains this problematic :
>>>>
>>>> -    <service name="addPromoToMarketingCampaign" ...
>>>> +    <service name="createMarketingCampaignPromo" ...
>>>>
>>>> Currently I follow this process :
>>>>
>>>> * duplicate the service definition
>>>> * Rename the duplicate with the correct name
>>>> * Set "DEPRECATED : use ${new service} instead" in the service
>>> description
>>>> * implement on old service definition : return error("use ${new service}
>>>> instead") to help developer to correct their specific code.
>>>>
>>>> I image that we can create a generic code to return the error and change
>>>> the old service definition like this :
>>>>
>>>>      <service name="addPromoToMarketingCampaign"
>>>> default-entity-name="MarketingCampaignPromo" engine="deprecated"
>>>> invoke="create" auth="true">
>>>>           <description>Deprecated please replace by
>>>> createMarketingCampaignPromo</description>
>>>>           <auto-attributes include="pk" mode="IN" optional="false"/>
>>>>           <auto-attributes include="nonpk" mode="IN" optional="true"/>
>>>>       </service>
>>>>
>>>> And deprecated engine return always error with the service description.
>>>>
>>>> After a new ofbiz stable branche creation, we remove all deprecated
>>>> service ?
>>>>
>>>> Any suggests, othet ideas, comments ?
>>>>
>>>> Cheers,
>>>>
>>>> Nicolas
>>>>
>>>> [1] https://issues.apache.org/jira/browse/OFBIZ-9550
>>>>
>>>> -- 
>>>> logoNrd <https://nereide.fr/>
>>>>          Nicolas Malin
>>>> The apache way <http://theapacheway.com/> : *Openness* Technical
>>>> decisions are made publicly
>>>> information@nereide.fr
>>>> 8 rue des Déportés 37000 TOURS, 02 47 50 30 54
>>>>
>>>> Apache OFBiz <http://ofbiz.apache.org/>|The Apache Way <
>>>> http://theapacheway.com/>|ofbiz-fr <http://www.ofbiz-fr.org/>|réseau LE
>>> <
>>>> http://www.libre-entreprise.org/>
>>>>
>
>


Re: Rule to deprecated a service

Posted by Nicolas Malin <ni...@nereide.fr>.
Thanks for your return Deepak and Taher.

I suggested to use comment to deprecated because it's really fast to 
implement with a combination of process and small modification code.

Like Taher, just I found not enough just a comment. What do you think 
about add a new xml element to service

<deprecate replace-by-service="theNewServiceName"> Explain the 
reason</deprecated>

and on the modelService, when a deprecate is parsed and when the service 
is call we put on log a warning :

WARN the service oldServiceName is now deprecated please use 
theNewService, the reason is ${Explain the reason}

Nicolas


Le 06/08/2017 à 08:03, Taher Alkhateeb a écrit :
> Hmmm I am not sure if comments are the most appropriate form for
> deprecation. Usually deprecation is useful when it is programmatic because
> it goes beyond raw text to logging warnings and highlighting by tools. You
> want the system to constantly remind you (both the developer and author) to
> get rid of the deprecated code.
>
> However if this entails a lot of code changes (not sure) then I think it
> might be useful to wait until we refactor the rest of the core components
> (entity engine, service engine, etc ...)
>
> On Aug 6, 2017 8:47 AM, "Deepak Dixit" <de...@hotwaxsystems.com>
> wrote:
>
>> Hi Nicolas,
>>
>> Idea is to mark service deprecated is looks good to me,
>> What I think instead of adding deprecated as engine we can set annotation
>> for deprecated service like we set in java, annotation can be simple
>> comment or xml annotation.
>>
>> And ideally we have to mark services deprecate instead of removing, with
>> expected release on which we will remove this deprecated code.
>>
>>
>> Thanks & Regards
>> --
>> Deepak Dixit
>> www.hotwaxsystems.com
>> www.hotwax.co
>>
>> On Sat, Aug 5, 2017 at 1:34 AM, Nicolas Malin <ni...@nereide.fr>
>> wrote:
>>
>>> Hello with the thread https://lists.apache.org/
>> thread.html/Zoz5yfpkrfcxts1
>>> and the voluntary to have a good coherence on crud service name,
>>>
>>> I would be have your suggest to manage old name and deprecated process.
>>>
>>> I review the issue OFBIZ-9550 [1] that contains this problematic :
>>>
>>> -    <service name="addPromoToMarketingCampaign" ...
>>> +    <service name="createMarketingCampaignPromo" ...
>>>
>>> Currently I follow this process :
>>>
>>> * duplicate the service definition
>>> * Rename the duplicate with the correct name
>>> * Set "DEPRECATED : use ${new service} instead" in the service
>> description
>>> * implement on old service definition : return error("use ${new service}
>>> instead") to help developer to correct their specific code.
>>>
>>> I image that we can create a generic code to return the error and change
>>> the old service definition like this :
>>>
>>>      <service name="addPromoToMarketingCampaign"
>>> default-entity-name="MarketingCampaignPromo" engine="deprecated"
>>> invoke="create" auth="true">
>>>           <description>Deprecated please replace by
>>> createMarketingCampaignPromo</description>
>>>           <auto-attributes include="pk" mode="IN" optional="false"/>
>>>           <auto-attributes include="nonpk" mode="IN" optional="true"/>
>>>       </service>
>>>
>>> And deprecated engine return always error with the service description.
>>>
>>> After a new ofbiz stable branche creation, we remove all deprecated
>>> service ?
>>>
>>> Any suggests, othet ideas, comments ?
>>>
>>> Cheers,
>>>
>>> Nicolas
>>>
>>> [1] https://issues.apache.org/jira/browse/OFBIZ-9550
>>>
>>> --
>>> logoNrd <https://nereide.fr/>
>>>          Nicolas Malin
>>> The apache way <http://theapacheway.com/> : *Openness* Technical
>>> decisions are made publicly
>>> information@nereide.fr
>>> 8 rue des Déportés 37000 TOURS, 02 47 50 30 54
>>>
>>> Apache OFBiz <http://ofbiz.apache.org/>|The Apache Way <
>>> http://theapacheway.com/>|ofbiz-fr <http://www.ofbiz-fr.org/>|réseau LE
>> <
>>> http://www.libre-entreprise.org/>
>>>


Re: Rule to deprecated a service

Posted by Jacques Le Roux <ja...@les7arts.com>.
I agree with Nicolas and Taher,

A POC would help to remove hesitations

Jacques


Le 06/08/2017 à 08:03, Taher Alkhateeb a écrit :
> Hmmm I am not sure if comments are the most appropriate form for
> deprecation. Usually deprecation is useful when it is programmatic because
> it goes beyond raw text to logging warnings and highlighting by tools. You
> want the system to constantly remind you (both the developer and author) to
> get rid of the deprecated code.
>
> However if this entails a lot of code changes (not sure) then I think it
> might be useful to wait until we refactor the rest of the core components
> (entity engine, service engine, etc ...)
>
> On Aug 6, 2017 8:47 AM, "Deepak Dixit" <de...@hotwaxsystems.com>
> wrote:
>
>> Hi Nicolas,
>>
>> Idea is to mark service deprecated is looks good to me,
>> What I think instead of adding deprecated as engine we can set annotation
>> for deprecated service like we set in java, annotation can be simple
>> comment or xml annotation.
>>
>> And ideally we have to mark services deprecate instead of removing, with
>> expected release on which we will remove this deprecated code.
>>
>>
>> Thanks & Regards
>> --
>> Deepak Dixit
>> www.hotwaxsystems.com
>> www.hotwax.co
>>
>> On Sat, Aug 5, 2017 at 1:34 AM, Nicolas Malin <ni...@nereide.fr>
>> wrote:
>>
>>> Hello with the thread https://lists.apache.org/
>> thread.html/Zoz5yfpkrfcxts1
>>> and the voluntary to have a good coherence on crud service name,
>>>
>>> I would be have your suggest to manage old name and deprecated process.
>>>
>>> I review the issue OFBIZ-9550 [1] that contains this problematic :
>>>
>>> -    <service name="addPromoToMarketingCampaign" ...
>>> +    <service name="createMarketingCampaignPromo" ...
>>>
>>> Currently I follow this process :
>>>
>>> * duplicate the service definition
>>> * Rename the duplicate with the correct name
>>> * Set "DEPRECATED : use ${new service} instead" in the service
>> description
>>> * implement on old service definition : return error("use ${new service}
>>> instead") to help developer to correct their specific code.
>>>
>>> I image that we can create a generic code to return the error and change
>>> the old service definition like this :
>>>
>>>      <service name="addPromoToMarketingCampaign"
>>> default-entity-name="MarketingCampaignPromo" engine="deprecated"
>>> invoke="create" auth="true">
>>>           <description>Deprecated please replace by
>>> createMarketingCampaignPromo</description>
>>>           <auto-attributes include="pk" mode="IN" optional="false"/>
>>>           <auto-attributes include="nonpk" mode="IN" optional="true"/>
>>>       </service>
>>>
>>> And deprecated engine return always error with the service description.
>>>
>>> After a new ofbiz stable branche creation, we remove all deprecated
>>> service ?
>>>
>>> Any suggests, othet ideas, comments ?
>>>
>>> Cheers,
>>>
>>> Nicolas
>>>
>>> [1] https://issues.apache.org/jira/browse/OFBIZ-9550
>>>
>>> --
>>> logoNrd <https://nereide.fr/>
>>>          Nicolas Malin
>>> The apache way <http://theapacheway.com/> : *Openness* Technical
>>> decisions are made publicly
>>> information@nereide.fr
>>> 8 rue des Déportés 37000 TOURS, 02 47 50 30 54
>>>
>>> Apache OFBiz <http://ofbiz.apache.org/>|The Apache Way <
>>> http://theapacheway.com/>|ofbiz-fr <http://www.ofbiz-fr.org/>|réseau LE
>> <
>>> http://www.libre-entreprise.org/>
>>>


Re: Rule to deprecated a service

Posted by Taher Alkhateeb <sl...@gmail.com>.
Hmmm I am not sure if comments are the most appropriate form for
deprecation. Usually deprecation is useful when it is programmatic because
it goes beyond raw text to logging warnings and highlighting by tools. You
want the system to constantly remind you (both the developer and author) to
get rid of the deprecated code.

However if this entails a lot of code changes (not sure) then I think it
might be useful to wait until we refactor the rest of the core components
(entity engine, service engine, etc ...)

On Aug 6, 2017 8:47 AM, "Deepak Dixit" <de...@hotwaxsystems.com>
wrote:

> Hi Nicolas,
>
> Idea is to mark service deprecated is looks good to me,
> What I think instead of adding deprecated as engine we can set annotation
> for deprecated service like we set in java, annotation can be simple
> comment or xml annotation.
>
> And ideally we have to mark services deprecate instead of removing, with
> expected release on which we will remove this deprecated code.
>
>
> Thanks & Regards
> --
> Deepak Dixit
> www.hotwaxsystems.com
> www.hotwax.co
>
> On Sat, Aug 5, 2017 at 1:34 AM, Nicolas Malin <ni...@nereide.fr>
> wrote:
>
> > Hello with the thread https://lists.apache.org/
> thread.html/Zoz5yfpkrfcxts1
> > and the voluntary to have a good coherence on crud service name,
> >
> > I would be have your suggest to manage old name and deprecated process.
> >
> > I review the issue OFBIZ-9550 [1] that contains this problematic :
> >
> > -    <service name="addPromoToMarketingCampaign" ...
> > +    <service name="createMarketingCampaignPromo" ...
> >
> > Currently I follow this process :
> >
> > * duplicate the service definition
> > * Rename the duplicate with the correct name
> > * Set "DEPRECATED : use ${new service} instead" in the service
> description
> > * implement on old service definition : return error("use ${new service}
> > instead") to help developer to correct their specific code.
> >
> > I image that we can create a generic code to return the error and change
> > the old service definition like this :
> >
> >     <service name="addPromoToMarketingCampaign"
> > default-entity-name="MarketingCampaignPromo" engine="deprecated"
> > invoke="create" auth="true">
> >          <description>Deprecated please replace by
> > createMarketingCampaignPromo</description>
> >          <auto-attributes include="pk" mode="IN" optional="false"/>
> >          <auto-attributes include="nonpk" mode="IN" optional="true"/>
> >      </service>
> >
> > And deprecated engine return always error with the service description.
> >
> > After a new ofbiz stable branche creation, we remove all deprecated
> > service ?
> >
> > Any suggests, othet ideas, comments ?
> >
> > Cheers,
> >
> > Nicolas
> >
> > [1] https://issues.apache.org/jira/browse/OFBIZ-9550
> >
> > --
> > logoNrd <https://nereide.fr/>
> >         Nicolas Malin
> > The apache way <http://theapacheway.com/> : *Openness* Technical
> > decisions are made publicly
> > information@nereide.fr
> > 8 rue des Déportés 37000 TOURS, 02 47 50 30 54
> >
> > Apache OFBiz <http://ofbiz.apache.org/>|The Apache Way <
> > http://theapacheway.com/>|ofbiz-fr <http://www.ofbiz-fr.org/>|réseau LE
> <
> > http://www.libre-entreprise.org/>
> >
>

Re: Rule to deprecated a service

Posted by Deepak Dixit <de...@hotwaxsystems.com>.
Hi Nicolas,

Idea is to mark service deprecated is looks good to me,
What I think instead of adding deprecated as engine we can set annotation
for deprecated service like we set in java, annotation can be simple
comment or xml annotation.

And ideally we have to mark services deprecate instead of removing, with
expected release on which we will remove this deprecated code.


Thanks & Regards
--
Deepak Dixit
www.hotwaxsystems.com
www.hotwax.co

On Sat, Aug 5, 2017 at 1:34 AM, Nicolas Malin <ni...@nereide.fr>
wrote:

> Hello with the thread https://lists.apache.org/thread.html/Zoz5yfpkrfcxts1
> and the voluntary to have a good coherence on crud service name,
>
> I would be have your suggest to manage old name and deprecated process.
>
> I review the issue OFBIZ-9550 [1] that contains this problematic :
>
> -    <service name="addPromoToMarketingCampaign" ...
> +    <service name="createMarketingCampaignPromo" ...
>
> Currently I follow this process :
>
> * duplicate the service definition
> * Rename the duplicate with the correct name
> * Set "DEPRECATED : use ${new service} instead" in the service description
> * implement on old service definition : return error("use ${new service}
> instead") to help developer to correct their specific code.
>
> I image that we can create a generic code to return the error and change
> the old service definition like this :
>
>     <service name="addPromoToMarketingCampaign"
> default-entity-name="MarketingCampaignPromo" engine="deprecated"
> invoke="create" auth="true">
>          <description>Deprecated please replace by
> createMarketingCampaignPromo</description>
>          <auto-attributes include="pk" mode="IN" optional="false"/>
>          <auto-attributes include="nonpk" mode="IN" optional="true"/>
>      </service>
>
> And deprecated engine return always error with the service description.
>
> After a new ofbiz stable branche creation, we remove all deprecated
> service ?
>
> Any suggests, othet ideas, comments ?
>
> Cheers,
>
> Nicolas
>
> [1] https://issues.apache.org/jira/browse/OFBIZ-9550
>
> --
> logoNrd <https://nereide.fr/>
>         Nicolas Malin
> The apache way <http://theapacheway.com/> : *Openness* Technical
> decisions are made publicly
> information@nereide.fr
> 8 rue des Déportés 37000 TOURS, 02 47 50 30 54
>
> Apache OFBiz <http://ofbiz.apache.org/>|The Apache Way <
> http://theapacheway.com/>|ofbiz-fr <http://www.ofbiz-fr.org/>|réseau LE <
> http://www.libre-entreprise.org/>
>