Thanks all for your opinions!

It seems that most of us are in favor of using Groovy instead of Java for services, events and tests.

Discussing this internally here at ecomify, it worried us a bit because of possible performance issues and the better support for Java in Eclipse (IntelliJ Idea is much better in this field but we cannot expect that everyone has a copy of it available).

I did some more reasearch and found a very good article from David E. Jones about his experience and workarounds he made for Moqui [1].

Other interesting resources are [2], [3], [4].

My learning from this research is, that we have to be careful how to use Groovy in OFBiz and need to define some core principles on how we want to use it.

One main pattern seems to use the @CompileStatic annotation to avoid performance issues. This comes with the downside of not being able to use Groovy features that depend on dynamic typing.

It would be good if the Groovy experts can add some opinions and I propose to make a "Groovy best practices" article for our Wiki out of them.

Thanks and regards,

Michael Brohl
ecomify GmbH
www.ecomify.de


[1] https://www.linkedin.com/pulse/how-make-groovy-fast-java-david-e-jones

[2] https://stackoverflow.com/a/5239450/4579639

[3] https://dzone.com/articles/java-7-vs-groovy-21

[4] https://stackoverflow.com/a/42040250/4579639


Best regards,

Michael Brohl
ecomify GmbH
www.ecomify.de



Am 19.05.17 um 16:20 schrieb Jacopo Cappellato:
My preference is to migrate to the Groovy DSL, and enhance it if required.
The Groovy DSL is the natural evolution of the core concepts and strengths
of Minilang and is preferable, in my opinion, to plain Java for the
implementation of business logic.

Jacopo


On Fri, May 19, 2017 at 12:38 PM, Michael Brohl <michael.br...@ecomify.de>
wrote:

Hi All,

according to the discussion in [1] and the Jira issue [2] we decided to
deprecate mini lang and migrate it to Java and/or Groovy code.

To help contributors finding the right approach for the migration, we
should define which mini lang code should be migrated to Java code, groovy
or some DSL (which has to be further developed).

I'd propose to generally migrate services, events and tests to Java code
to begin with.


There was also a proposal by Paul Foxworthy [3] to have an automatic
conversion between mini lang and groovy DSL. Maybe we can extend this to
generate Java code also?

Any ideas and approach to do this?


Happy to hear your opinions,

best regards,

Michael Brohl
ecomify GmbH
www.ecomify.de


[1] https://lists.apache.org/thread.html/253b41060a295b8ab68bc78
763cc129fc74b712cf776f8716022097f@%3Cdev.ofbiz.apache.org%3E

[2] https://issues.apache.org/jira/browse/OFBIZ-9350

[3] https://lists.apache.org/thread.html/6ce592d253c102e50f25f5f
2095dab1e9b7c54e48260b9e6d1cda9e1@%3Cdev.ofbiz.apache.org%3E






Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to