You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Tomek <to...@wp.pl> on 2021/04/16 12:48:45 UTC

Choosing between Java and Groovy

Hi,

I'am browsing the code of OFBiz and I see that the services are written
in multiple languages like Java or Groovy and even XML. Are there some
rules that help me to choose between Java and Groovy?

Tomek


Re: Choosing between Java and Groovy

Posted by Rishi Solanki <ri...@gmail.com>.
Groovy has significant goodies to adopt over java like easy to learn due to
java like syntax, scripting language can be use to develop services faster
than java, default packages and type casting shorten syntax makes it easy
to understand. No build and server restart require.

The only reason to use java instead is performance and accuracy, when we do
longer db operations and precise calculations then java is better
candidate. Like groovy makes some assumptions on data types and the same
applies to decimal precisions.

Additional information, bit late here but it should be helpful.

Best Regards,
--
Rishi Solanki
*CTO, Mindpath Technology*
Intelligent Solutions
cell: +91-98932-87847
LinkedIn <https://www.linkedin.com/in/rishi-solanki-62271b7/>


On Fri, Apr 16, 2021 at 8:39 PM Jacques Le Roux <
jacques.le.roux@les7arts.com> wrote:

> Exactly a very important point, even in production (though on the edge in
> this case), same with Freemarker and Minilang (deprecated in favour of
> Groovy)
>
> Jacques
>
> Le 16/04/2021 à 17:03, Tomek a écrit :
> > Hi Danny,
> >
> > Thank you for your response. I prefer Java rather than Groovy. But as
> > far as I know writing services in Java required restart the server. It
> > seems that choosing Groovy is better option from productivity point of
> view.
> >
> > Tomek
> >
> > On 16.04.2021 15:49, Danny Trunk wrote:
> >> Additionally Regarding your question to choose between Java and Groovy:
> That depends on your personal preferences. You can choose whatever you want.
> >>
> >>> Tomek <to...@wp.pl> hat am 16.04.2021 14:48 geschrieben:
> >>>
> >>>
> >>> Hi,
> >>>
> >>> I'am browsing the code of OFBiz and I see that the services are written
> >>> in multiple languages like Java or Groovy and even XML. Are there some
> >>> rules that help me to choose between Java and Groovy?
> >>>
> >>> Tomek
>
>

Re: Choosing between Java and Groovy

Posted by Jacques Le Roux <ja...@les7arts.com>.
Exactly a very important point, even in production (though on the edge in this case), same with Freemarker and Minilang (deprecated in favour of Groovy)

Jacques

Le 16/04/2021 à 17:03, Tomek a écrit :
> Hi Danny,
>
> Thank you for your response. I prefer Java rather than Groovy. But as
> far as I know writing services in Java required restart the server. It
> seems that choosing Groovy is better option from productivity point of view.
>
> Tomek
>
> On 16.04.2021 15:49, Danny Trunk wrote:
>> Additionally Regarding your question to choose between Java and Groovy: That depends on your personal preferences. You can choose whatever you want.
>>
>>> Tomek <to...@wp.pl> hat am 16.04.2021 14:48 geschrieben:
>>>
>>>   
>>> Hi,
>>>
>>> I'am browsing the code of OFBiz and I see that the services are written
>>> in multiple languages like Java or Groovy and even XML. Are there some
>>> rules that help me to choose between Java and Groovy?
>>>
>>> Tomek


Re: Choosing between Java and Groovy

Posted by Tomek <to...@wp.pl>.
Hi Danny,

Thank you for your response. I prefer Java rather than Groovy. But as
far as I know writing services in Java required restart the server. It
seems that choosing Groovy is better option from productivity point of view.

Tomek

On 16.04.2021 15:49, Danny Trunk wrote:
> Additionally Regarding your question to choose between Java and Groovy: That depends on your personal preferences. You can choose whatever you want.
>
>> Tomek <to...@wp.pl> hat am 16.04.2021 14:48 geschrieben:
>>
>>  
>> Hi,
>>
>> I'am browsing the code of OFBiz and I see that the services are written
>> in multiple languages like Java or Groovy and even XML. Are there some
>> rules that help me to choose between Java and Groovy?
>>
>> Tomek

Re: Choosing between Java and Groovy

Posted by Jacques Le Roux <ja...@les7arts.com>.
Also Minilang (OFBiz specific DSL language in XML) is deprecated:
https://cwiki.apache.org/confluence/display/OFBIZ/Mini+Lang+Deprecation
https://cwiki.apache.org/confluence/display/OFBIZ/Mini+Language+-+minilang+-+simple-method+-+Reference
https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Tutorial+-+From+Mini+Language+to+Groovy

HTH

Jacques

Le 16/04/2021 à 15:49, Danny Trunk a écrit :
> Additionally Regarding your question to choose between Java and Groovy: That depends on your personal preferences. You can choose whatever you want.
>
>> Tomek <to...@wp.pl> hat am 16.04.2021 14:48 geschrieben:
>>
>>   
>> Hi,
>>
>> I'am browsing the code of OFBiz and I see that the services are written
>> in multiple languages like Java or Groovy and even XML. Are there some
>> rules that help me to choose between Java and Groovy?
>>
>> Tomek


Re: Choosing between Java and Groovy

Posted by Danny Trunk <dt...@zyres.com>.
Additionally Regarding your question to choose between Java and Groovy: That depends on your personal preferences. You can choose whatever you want.

> Tomek <to...@wp.pl> hat am 16.04.2021 14:48 geschrieben:
> 
>  
> Hi,
> 
> I'am browsing the code of OFBiz and I see that the services are written
> in multiple languages like Java or Groovy and even XML. Are there some
> rules that help me to choose between Java and Groovy?
> 
> Tomek

Re: Choosing between Java and Groovy

Posted by Danny Trunk <dt...@zyres.com>.
Hi,

you can define the engine of your service in the engine attribute or your service definition: https://cwiki.apache.org/confluence/display/OFBIZ/Service+Engine+Guide#ServiceEngineGuide-ServiceDefinitionserviceDefinition

You can choose between engine definitions configured in your serviceengine.xml: https://cwiki.apache.org/confluence/display/OFBIZ/Service+Engine+Configuration+Guide#ServiceEngineConfigurationGuide-EngineDefinitions

Danny

> Tomek <to...@wp.pl> hat am 16.04.2021 14:48 geschrieben:
> 
>  
> Hi,
> 
> I'am browsing the code of OFBiz and I see that the services are written
> in multiple languages like Java or Groovy and even XML. Are there some
> rules that help me to choose between Java and Groovy?
> 
> Tomek