Re: [VOTE] to use Lombok inside OFBiz

2020-09-08 Thread Mridul Pathak
-1

Don’t think it’s of much use in OFBiz.

Thanks.
Mridul Pathak

> On 08-Sep-2020, at 1:06 PM, Jacques Le Roux  
> wrote:
> 
> Hi,
> 
> Following our discussions about using Lombok inside OFBiz, as it's not clear 
> if we should, here is a vote to decide about that.
> 
> The question is: "should we use Lombok inside OFBiz?"
> 
> Please cast your vote:
> 
> [+1]  to use Lombok inside OFBiz
> [0] to abstain
> [-1]to not use Lombok inside OFBiz
> 
> This vote will be open for a week.
> 
> Thanks
> 
> Jacques
> 



Re: [VOTE] to use Lombok inside OFBiz

2020-09-08 Thread Deepak Dixit
-1

https://medium.com/@vgonzalo/dont-use-lombok-672418daa819

Thanks & Regards
--
Deepak Dixit
ofbiz.apache.org


On Tue, Sep 8, 2020 at 5:11 PM Nicola Mazzoni 
wrote:

> -1
>
> Lombok helps reduce code when using an orm.  Fortunately ofbiz uses the
> generic value;  a db record is a map and not an object 🙂
>
> Il mar 8 set 2020, 09:37 Jacques Le Roux  ha
> scritto:
>
> > Hi,
> >
> > Following our discussions about using Lombok inside OFBiz, as it's not
> > clear if we should, here is a vote to decide about that.
> >
> > The question is: "should we use Lombok inside OFBiz?"
> >
> > Please cast your vote:
> >
> > [+1]to use Lombok inside OFBiz
> > [0] to abstain
> > [-1]to not use Lombok inside OFBiz
> >
> > This vote will be open for a week.
> >
> > Thanks
> >
> > Jacques
> >
> >
>


Re: [VOTE] to use Lombok inside OFBiz

2020-09-08 Thread Nicola Mazzoni
-1

Lombok helps reduce code when using an orm.  Fortunately ofbiz uses the
generic value;  a db record is a map and not an object 🙂

Il mar 8 set 2020, 09:37 Jacques Le Roux  ha
scritto:

> Hi,
>
> Following our discussions about using Lombok inside OFBiz, as it's not
> clear if we should, here is a vote to decide about that.
>
> The question is: "should we use Lombok inside OFBiz?"
>
> Please cast your vote:
>
> [+1]to use Lombok inside OFBiz
> [0] to abstain
> [-1]to not use Lombok inside OFBiz
>
> This vote will be open for a week.
>
> Thanks
>
> Jacques
>
>


Re: [VOTE] to use Lombok inside OFBiz

2020-09-08 Thread Anil Patel
-1

I don't think Lombok is right for the OFBiz framework.

Looks like Lombok is good for object oriented programming and in OFBiz we
generally stay away from POJO or other similar object oriented programming
practices.

Thanks and Regards
Anil Patel
COO
HotWax Systems
http://www.hotwaxsystems.com
Cell: + 1 509 398 3120


On Tue, Sep 8, 2020 at 1:45 PM Michael Brohl 
wrote:

> -1
>
> Thanks,
>
> Michael
>
>
> Am 08.09.20 um 09:36 schrieb Jacques Le Roux:
> > Hi,
> >
> > Following our discussions about using Lombok inside OFBiz, as it's not
> > clear if we should, here is a vote to decide about that.
> >
> > The question is: "should we use Lombok inside OFBiz?"
> >
> > Please cast your vote:
> >
> > [+1]to use Lombok inside OFBiz
> > [0] to abstain
> > [-1]to not use Lombok inside OFBiz
> >
> > This vote will be open for a week.
> >
> > Thanks
> >
> > Jacques
> >
>
>


Re: Behavior of Groovy vs JUnit tests with test data

2020-09-08 Thread Carsten Schinzer
Hello Jacques,


Thanks for the pointer.

My issue is that I find the XML test cases not good enough as e.g. the 
updateCustRequest service has special behaviors when cancelling or adding 
stories to a custRequest which are currently not covered by the test in XML.
Similar for the transitions between custRequestStatusIds some are forbidden and 
some are not and the test cases did not cover either.

The issue is really that in Groovy when starting from a given data load, the 
data is not refreshed/reset after a test case is run and hence I decided to do 
the testing of services in full and plain JUnit. Others apparently have decided 
the same.

In the subtasks you pointed me to, the problem is circumvented by creating the 
data in a common method before running a test against it. So the data load does 
not occur via the tested location. I wanted to re-use existing test data for 
custRequest.

If you tell me that the intent is to also get rid of the test data defined in 
the tested, then I would be on the wrong track and need to change my code to be 
like the one you pointed me to. Is there any decision made to also get rid of 
the test data loads when migrating minilang to groovy?

Warm regards


Carsten

PS: I also find it a pity that the JIRA tickets that are distributed are 
already subtasks in Stories instead of Stories in Epics. It disallows me to 
track the work done in sufficient detail other than commenting on the subtask. 
Do you know why that has been done like this? I should possibly rather discuss 
with Pierre Smits I guess?


> Am 08.09.2020 um 11:54 schrieb Jacques Le Roux :
> 
> Hi Carsten,
> 
> Did you have a look at the WIP under 
> https://issues.apache.org/jira/browse/OFBIZ-11232 and how it's done in 
> subtasks?
> 
> Jacques
> 
> Le 03/09/2020 à 13:43, Carsten Schinzer a écrit :
>> Hi all,
>> 
>> 
>> I did find and try the following from google search:
>> 
>> - wrap all the tests in a class
>> - tag the class with @RunWith(SpringRunner.class)
>> - tag every method that manipulates the entity data with 
>> @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
>> 
>> This has NOT been successful, hence a strong indication that running the 
>> cases in Groovy will make entity data manipulations to be sticky and not 
>> reverted for the subsequent test case run.
>> I am going to rework my cases to run as JUnit test cases in a Java class.
>> 
>> Warm regards
>> 
>> 
>> Carsten
>> 
>>> Am 03.09.2020 um 13:13 schrieb Carsten Schinzer 
>>> :
>>> 
>>> Hi everyone,
>>> 
>>> 
>>> Recently, I did find that test cases actually are much easier to write in 
>>> Groovy and hence I started doing that, but now I stumble across the fact 
>>> that some of the Groovy tests seem to find changes applied to entities from 
>>> previous tests. The behavior is the following:
>>> 
>>> - I load the test data with instructions given in the tested XML
>>> - I manipulate data in the first test data, e.g. a status on an entity
>>> - when I run the next test case I do not get the originally loaded entity 
>>> but the manipulated one from the previous test
>>> 
>>> This is different from JUnit in Java where the entities seem to exist as 
>>> loaded from the testdata XML with every new test case.
>>> It would obviously mean that I we need to implement my testing in JUnit 
>>> (Java) rather when we want extensive testing of the services and need to 
>>> start from the loaded data every time.
>>> 
>>> Can anyone confirm this behavior of Groovy over JUnit?
>>> Warm regards
>>> 
>>> 
>>> Carsten
>>> 



Re: Behavior of Groovy vs JUnit tests with test data

2020-09-08 Thread Jacques Le Roux

Hi Carsten,

Did you have a look at the WIP under 
https://issues.apache.org/jira/browse/OFBIZ-11232 and how it's done in subtasks?

Jacques

Le 03/09/2020 à 13:43, Carsten Schinzer a écrit :

Hi all,


I did find and try the following from google search:

- wrap all the tests in a class
- tag the class with @RunWith(SpringRunner.class)
- tag every method that manipulates the entity data with 
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)

This has NOT been successful, hence a strong indication that running the cases 
in Groovy will make entity data manipulations to be sticky and not reverted for 
the subsequent test case run.
I am going to rework my cases to run as JUnit test cases in a Java class.

Warm regards


Carsten


Am 03.09.2020 um 13:13 schrieb Carsten Schinzer 
:

Hi everyone,


Recently, I did find that test cases actually are much easier to write in 
Groovy and hence I started doing that, but now I stumble across the fact that 
some of the Groovy tests seem to find changes applied to entities from previous 
tests. The behavior is the following:

- I load the test data with instructions given in the tested XML
- I manipulate data in the first test data, e.g. a status on an entity
- when I run the next test case I do not get the originally loaded entity but 
the manipulated one from the previous test

This is different from JUnit in Java where the entities seem to exist as loaded 
from the testdata XML with every new test case.
It would obviously mean that I we need to implement my testing in JUnit (Java) 
rather when we want extensive testing of the services and need to start from 
the loaded data every time.

Can anyone confirm this behavior of Groovy over JUnit?
Warm regards


Carsten



Re: varchar(255) in fieldtypepostgres.xml

2020-09-08 Thread Jacques Le Roux

Hi Development  (is that a real name? :D),

Sorry for the late reply, sure please do. Before: you want to change it where? In entityengine.xml I guess. If you want to put more information you 
might look at entity-engine.adoc


Thanks

Jacques

Le 03/09/2020 à 18:36, Development a écrit :

Thanks for the reply.  The link essentially says "to make postgres consistent with the other 
databases".  I researched it out, and found that *every single* supported database has a text 
type that goes over 255 char! (and gets used for type "very-long")

I know I do, and I would imagine people could easily go over 255 char when writing things 
like a comment or description about something. Would it make sense to change description 
and comment field types for all databases to be whatever that database has for type 
"very-long"?  If so, do I submit this as a JIRA issue?
  


From: Jacques Le Roux [jacques.le.r...@les7arts.com]
Sent: Tuesday, August 11, 2020 6:30 AM
To: dev@ofbiz.apache.org
Subject: Re: varchar(255) in fieldtypepostgres.xml

Hi,

Please check https://svn.apache.org/viewvc?view=revision&revision=1697590

This is also related https://markmail.org/message/xuwhnbmum3evejwk

Jacques

Le 10/08/2020 à 20:30, Development a écrit :

In /framework/entity/fieldtype/fieldtypepostgres.xml I saw some lines like:

  
  
  


In postgres, using "VARCHAR(255)" saves no space in the database over using "VARCHAR" 
(with no number) or "TEXT", the only difference is that the 255 slows it down with error checking.

Is there any reason on the ofbiz side to not just change this to plain "VARCHAR" or 
"TEXT"?  Like perhaps the forms would only display the first 255 characters of it or 
something?

Obviously I can do this for my own installation.  I'm asking here cause it 
feels like something that should be pushed upstream.







CONFIDENTIALITY NOTICE: This message is intended only for the use of the person 
or organization to which it is addressed or was intended to be addressed, and 
may contain information that is privileged, confidential and exempt from 
disclosure under applicable law. If the reader of this message is not the 
intended recipient, or responsible for delivering the message to the intended 
recipient, you are hereby notified that any dissemination, distribution or 
copying of this communication is strictly prohibited. If you have received this 
communication in error, please notify the sender immediately by email and 
delete the original message immediately . The sender, its subsidiaries and 
affiliates, do not accept liability for any errors, omissions, corruption or 
virus in the contents of this message or any attachments that arise as a result 
of e-mail transmission. Thank you.



CONFIDENTIALITY NOTICE: This message is intended only for the use of the person 
or organization to which it is addressed or was intended to be addressed, and 
may contain information that is privileged, confidential and exempt from 
disclosure under applicable law. If the reader of this message is not the 
intended recipient, or responsible for delivering the message to the intended 
recipient, you are hereby notified that any dissemination, distribution or 
copying of this communication is strictly prohibited. If you have received this 
communication in error, please notify the sender immediately by email and 
delete the original message immediately . The sender, its subsidiaries and 
affiliates, do not accept liability for any errors, omissions, corruption or 
virus in the contents of this message or any attachments that arise as a result 
of e-mail transmission. Thank you.




Re: Akamai and Janrain

2020-09-08 Thread Jacques Le Roux

Hi,

Anybody aware and concerned about this feature?

Note: it has been introduced by Hans in 2011

Thanks

Jacques

Le 29/08/2020 à 11:31, Jacques Le Roux a écrit :

Hi,

Is the information in ecommerce.properties about Janrain still valid since 
Akamai bought Janrain?

Thanks

Jacques



Re: ERD Diagram and Seed Data

2020-09-08 Thread Wei Zhang
Hi Xinhuan,

A Product is a description of a service, facility use, asset use, or a digital 
or physical good for sale. An Asset commonly represents an instance of a 
Product, or in other words the physical item that the Product record describes.

Regarding hierarchy structure data, you may interest in BOM data structure, see 
https://cwiki.apache.org/confluence/display/OFBIZ/%5BWIP%5D+Getting+Started+with+Apache+OFBiz+Manufacturing+and+MRP+in+5+Easy+Steps



在 2020/9/8 下午3:35,“Xinhuan Zheng” 写入:

Good Afternoon,

I'm a developer working for some digital company. My use case is not too 
general, and is simpler than OFBiz. It is for a small business. I have 
maintained a few Excel spreadsheet for a few years for some business asset. The 
spreadsheet are not formal modeled, and from time to time we maintain and query 
those sheets. The data present characteristics of hierarchy structure and 
different attribute sets for different kind types.  Maintaining those data in 
database may require formal data modeling and I am not clear how it works.

I came across an old publication about Universal E-Catalog, and I learned 
about OFBiz project. I want to learn Key-Value pair modeling pattern. I 
downloaded the OFBiz ERD diagrams. I studied the ERD diagrams for a couple 
days, and what I'm interested is Product, ProductType, Content, ContentType, 
Entities that use Universal E-Catalog pattern. You can correct me if that is 
not the case. This modeling pattern needs to have seed data to understand, and 
I found the best way to view the seed data is using Excel spreadsheet. I found 
the project on Github containing Seed data, however, all Seed data are XML 
format. Is there any possibilities to extract some XML seed data to convert to 
CSV format? From the ERD diagram, I think I need Product, ProductType, 
ProductTypeAttr, Content, ContentType, ContentAttr seed data.

Thank you!

Xinhuan Zheng




Re: ERD Diagram and Seed Data

2020-09-08 Thread Jacques Le Roux

Hi Zheng,

Your message has been moderated, else it would not have reached this Mailing 
List.

Please subscribe to the user ML for such questions and then use your email 
client.
See why here http://ofbiz.apache.org/mailing-lists.html.

You will get a better support, people can answer you on the ML.
The wider the audience the better the answers you might get.

Also it's more work for moderators who have to accept your messages as long as 
you have not subscribed.
I'll personally no longer accept them (other moderators still could).

Thanks

This said https://markmail.org/message/vrmvi27yepqvewzj is the more recent answer on this subject. If you want to know more you may review 
https://ofbiz.markmail.org/search/?q=excel


Also https://cwiki.apache.org/confluence/display/OFBIZ/Export+to+Excel could 
interest you

HTH (please remember to answer on user ML and not here, TIA)

Jacques

Le 07/09/2020 à 23:30, Xinhuan Zheng a écrit :

Good Afternoon,

I'm a developer working for some digital company. My use case is not too 
general, and is simpler than OFBiz. It is for a small business. I have 
maintained a few Excel spreadsheet for a few years for some business asset. The 
spreadsheet are not formal modeled, and from time to time we maintain and query 
those sheets. The data present characteristics of hierarchy structure and 
different attribute sets for different kind types.  Maintaining those data in 
database may require formal data modeling and I am not clear how it works.

I came across an old publication about Universal E-Catalog, and I learned about 
OFBiz project. I want to learn Key-Value pair modeling pattern. I downloaded 
the OFBiz ERD diagrams. I studied the ERD diagrams for a couple days, and what 
I'm interested is Product, ProductType, Content, ContentType, Entities that use 
Universal E-Catalog pattern. You can correct me if that is not the case. This 
modeling pattern needs to have seed data to understand, and I found the best 
way to view the seed data is using Excel spreadsheet. I found the project on 
Github containing Seed data, however, all Seed data are XML format. Is there 
any possibilities to extract some XML seed data to convert to CSV format? From 
the ERD diagram, I think I need Product, ProductType, ProductTypeAttr, Content, 
ContentType, ContentAttr seed data.

Thank you!

Xinhuan Zheng



Re: [VOTE] to use Lombok inside OFBiz

2020-09-08 Thread Michael Brohl

-1

Thanks,

Michael


Am 08.09.20 um 09:36 schrieb Jacques Le Roux:

Hi,

Following our discussions about using Lombok inside OFBiz, as it's not 
clear if we should, here is a vote to decide about that.


The question is: "should we use Lombok inside OFBiz?"

Please cast your vote:

[+1]    to use Lombok inside OFBiz
[0] to abstain
[-1]    to not use Lombok inside OFBiz

This vote will be open for a week.

Thanks

Jacques





smime.p7s
Description: S/MIME Cryptographic Signature


[VOTE] to use Lombok inside OFBiz

2020-09-08 Thread Jacques Le Roux

Hi,

Following our discussions about using Lombok inside OFBiz, as it's not clear if 
we should, here is a vote to decide about that.

The question is: "should we use Lombok inside OFBiz?"

Please cast your vote:

[+1]to use Lombok inside OFBiz
[0] to abstain
[-1]to not use Lombok inside OFBiz

This vote will be open for a week.

Thanks

Jacques



ERD Diagram and Seed Data

2020-09-08 Thread Xinhuan Zheng
Good Afternoon,

I'm a developer working for some digital company. My use case is not too 
general, and is simpler than OFBiz. It is for a small business. I have 
maintained a few Excel spreadsheet for a few years for some business asset. The 
spreadsheet are not formal modeled, and from time to time we maintain and query 
those sheets. The data present characteristics of hierarchy structure and 
different attribute sets for different kind types.  Maintaining those data in 
database may require formal data modeling and I am not clear how it works.

I came across an old publication about Universal E-Catalog, and I learned about 
OFBiz project. I want to learn Key-Value pair modeling pattern. I downloaded 
the OFBiz ERD diagrams. I studied the ERD diagrams for a couple days, and what 
I'm interested is Product, ProductType, Content, ContentType, Entities that use 
Universal E-Catalog pattern. You can correct me if that is not the case. This 
modeling pattern needs to have seed data to understand, and I found the best 
way to view the seed data is using Excel spreadsheet. I found the project on 
Github containing Seed data, however, all Seed data are XML format. Is there 
any possibilities to extract some XML seed data to convert to CSV format? From 
the ERD diagram, I think I need Product, ProductType, ProductTypeAttr, Content, 
ContentType, ContentAttr seed data.

Thank you!

Xinhuan Zheng



Re: A little bit of Lombok

2020-09-08 Thread Jacques Le Roux

Hi Daniel,

We did not make an official vote yet. As it's an important matter, I'll start a vote in order to decide if we should, or not, use Lombok inside OFBiz 
OOTB.


Thanks

Jacques

Le 08/09/2020 à 01:25, Daniel Watford a écrit :

Hello all,

Based on this thread it doesn't seem that we have a strong consensus either
for or against use of Lombok at this time.

Votes:
Dan W (me!):  +1
Jacques: +1
Shi: -1

Sentiment in other messages seems positive but cautious.

Some pros and cons have been presented.

I need some direction from the project on how to proceed - Is use of Lombok
acceptable within OFBiz?

Thanks,

Dan.


On Sat, 29 Aug 2020 at 13:54, Jacques Le Roux 
wrote:


Thanks JInghai!


Le 29/08/2020 à 14:50, Shi Jinghai a écrit :

Hi Jacques,

It’s about a year ago. My IDE is eclipse. I spent about half of a day to

make Lombok work correctly, Getter/Setter, AllArgsConstructor, plugin
version problem and etc.

Does Lombok plugin worth a requirement and a time investment by all

OFBiz developers? My answer is NO.

Kind Regards,

Shi Jinghai

发送自 Windows 10 版邮件应用

发件人: Jacques Le Roux
发送时间: 2020年8月27日 15:10
收件人: dev@ofbiz.apache.org
主题: Re: A little bit of Lombok

Thanks Jinghai,

Is that long ago? Do you remember the most important issues you crossed?

Jacques

Le 27/08/2020 à 06:20, Shi Jinghai a écrit :

Just my 2 cents.

-1 for using Lombok plugin in OFBiz.

I had some not good experiences with this plugin in Apereo CAS 5.3.x.



发送自 Windows 10 版邮件应用

发件人: Daniel Watford
发送时间: 2020年7月28日 20:44
收件人: dev@ofbiz.apache.org
主题: A little bit of Lombok

Hello,

Back in April the possibility of using Lombok for the generation of some
boilerplate code was mentioned on the mailing list [1].

As part of work-in-progress on OFBIZ-11900 (refactoring

MacroFormRenderer)

I have used Lombok on a few small classes. The work-in-progress branch

can

be found at [2].

Only a small amount of Lombok has been used so far, meaning it

shouldn't be

too difficult to remove it if needed.

In build.gradle I have used the FreeFair Gradle Lombok plugin [3]
referenced by the Lombok Project [4].

Building with the lombok plugin seemed to use a lot of memory and caused
gradle to garbage collect and run out of heap regularly. To resolve

this I

increased the about of memory available to gradle in gradle.properties
using:

org.gradle.jvmargs=-Xmx2g -XX\:MaxHeapSize\=4g

Tuning this might be important depending on the CI infrastructure used

by

the Ofbiz project.

You will likely need your IDE to apply annotation processing otherwise

you

might see warning of missing methods. In IntelliJ I use what appears to

be

the de facto Lombok plugin [5].
Guidance is available from the Lombok project for other IDEs [6].

Lombok @ToString annotations have been applied to RenderableFtlString

and

RenderableFtlNoop. This causes Lombok to insert toString() methods into

the

classes based on the class names and field values.

The @Value annotation has been applied to
MacroCallParameterStringValue, MacroCallParameterBooleanValue
and MacroCallParameterMapValue. This annotation turns those classes into
immutable-like entities, where all fields must be set in the inserted
constructor and are available from automatically inserted getters.
ToString(), equals and hashCode() methods are also created meaning these
classes can be relied upon as map keys if needed.

The @Builder annotation has been applied to RenderableFtlMacroCall
and RenderableFtlSequence. This annotation does quite a lot so I'd
recommend you run delombok (instructions below) to see the code that

Lombok

inserts for us.

To see the sources generated by Lombok we can run DeLombok. At the

command

line execute:
./gradlew delombok

A copy of all sources (not just those with lombok annotations) will be
placed under build/delombok. Please take a look at the delomboked

sources

for the above classes under
build/delombok/main/org/apache/ofbiz/widget/renderer/macro/parameter and
build/delombok/main/org/apache/ofbiz/widget/renderer/macro/renderable.

Please let me know what you think about this usage of Lombok.

Thanks,

Dan.

[1] -

http://ofbiz.135035.n4.nabble.com/Default-constructors-in-JAVA-classes-tp4749257p4749258.html

[2] -

https://github.com/danwatford/ofbiz-framework/tree/OFBIZ-11900-WIP

[3] - https://plugins.gradle.org/plugin/io.freefair.lombok
[4] - https://projectlombok.org/setup/gradle
[5] - https://plugins.jetbrains.com/plugin/6317-lombok/
[6] - https://projectlombok.org/setup/overview

--
Daniel Watford