You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@fineract.apache.org by Arnold Galovics <ga...@gmail.com> on 2022/03/16 12:47:52 UTC

Lombok usage?

Dear Community,

While I've contributed to the codebase, I realized there's a lot of
boilerplate code for a lot of classes.
Mainly, I see the constructors which are really not doing anything except
assigning parameters to fields + the @Autowired annotation. And we have a
lot of getters/setters as well, mostly on DTOs.

I don't have a number at hand but I think by using Lombok we could reduce
the amount of boilerplate in the codebase considerably, I'm just not sure
if somebody has considered it before.

If there's no objection, I'd start introducing it gradually and then others
could also benefit from it.

Thoughts?

Best,
Arnold

Re: Lombok usage?

Posted by Petri Tuomola <pe...@gmail.com>.
This is great news - very happy to see this! I agree this should significantly reduce the amount of boilerplate code. Well done - and yes, I’ll try to contribute to “cleanup” as well :-)

Regards
Petri

> On 8 Apr 2022, at 22:06, Arnold Galovics <ar...@apache.org> wrote:
> 
> Hi guys,
> 
> Just wanted to notify everybody, Lombok has landed on develop and already showing a great deal of value in terms of reducing the boilerplate code.
> 
> I touched some classes to kick-off the refactoring effort; you can find it in this PR: https://github.com/apache/fineract/pull/2269 <https://github.com/apache/fineract/pull/2269>
> 
> I'd like to take this as a chance to ask everybody to spend 5 more minutes more on every PR you do and think about whether you can reduce some code with Lombok around the places you touch; making the codebase more and more maintainable. 
> Let's be good boy scouts. ;-)
> 
> Let me know if you have questions.
> 
> Best,
> Arnold
> 
> 
> 
> On Sat, Mar 19, 2022 at 10:27 AM Gerald O'Sullivan <osullivan.gerald@gmail.com <ma...@gmail.com>> wrote:
> Dear Friends
> 
> Regarding the use of Lombok in Fineract, note that concerns have been raised about its use, and its compatibility (or lack of it) with JDK 16. See this post <https://www.reddit.com/r/java/comments/m66r8w/is_lombok_in_danger_of_becoming_incompatible_with/> or this article <https://levelup.gitconnected.com/be-careful-with-lombok-2e2edfc01110> for example. 
> 
> Personally, I avoid it to be on the safe side. Yes, it does reduce boilerplate, but that is not enough of a reason for me. Too much of the code disappears below the waterline for my liking.
> 
> Note that I am NOT saying "don't use it", I am saying "approach with caution".
> 
> Best
> Gerald
> 
> On Thu, 17 Mar 2022 at 15:05, Avik Ganguly <avik@fynarfin.io <ma...@fynarfin.io>> wrote:
> +1
> 
> On Wed, Mar 16, 2022 at 6:18 PM Arnold Galovics <galovicsarnold@gmail.com <ma...@gmail.com>> wrote:
> Dear Community,
> 
> While I've contributed to the codebase, I realized there's a lot of boilerplate code for a lot of classes.
> Mainly, I see the constructors which are really not doing anything except assigning parameters to fields + the @Autowired annotation. And we have a lot of getters/setters as well, mostly on DTOs.
> 
> I don't have a number at hand but I think by using Lombok we could reduce the amount of boilerplate in the codebase considerably, I'm just not sure if somebody has considered it before.
> 
> If there's no objection, I'd start introducing it gradually and then others could also benefit from it.
> 
> Thoughts?
> 
> Best,
> Arnold
> 
> Disclaimer:
> 
> Privileged & confidential information is contained in this message (including all attachments). If you are not an intended recipient of this message, please destroy this message immediately and kindly notify
> the sender by reply e-mail. Any unauthorised use or dissemination of this message in any manner whatsoever, in whole or in part, is strictly prohibited. This e-mail, including all attachments hereto, (i) is for discussion purposes only and shall not be deemed or construed to be a professional opinion unless expressly stated otherwise, and (ii) is not intended, written or sent to be used, and cannot and shall not be used, for any unlawful purpose. This communication, including any attachments, may not be free of viruses, interceptions or interference, and may not be compatible with your systems. You should carry out your own virus checks before opening any attachment to this e-mail. The sender of this e-mail and 
> Fynarfin Tech Private Limited shall not be liable for any damage that you may sustain as a result of viruses, incompleteness of this message, a delay in receipt of this message or computer problems experienced. 
> 
> 
> -- 
> Gerald O'Sullivan
> Solution Architect
> Cellphone: +27 82 412 9962


Re: Lombok usage?

Posted by VICTOR MANUEL ROMERO RODRIGUEZ <vi...@fintecheando.mx>.
+1

El vie, 8 abr 2022 a las 9:45, Aleksandar Vidakovic (<
cheetah@monkeysintown.com>) escribió:

> +1
>
> On Fri, Apr 8, 2022 at 4:06 PM Arnold Galovics <ar...@apache.org> wrote:
>
>> Hi guys,
>>
>> Just wanted to notify everybody, Lombok has landed on develop and already
>> showing a great deal of value in terms of reducing the boilerplate code.
>>
>> I touched some classes to kick-off the refactoring effort; you can find
>> it in this PR: https://github.com/apache/fineract/pull/2269
>>
>> I'd like to take this as a chance to ask everybody to spend 5 more
>> minutes more on every PR you do and think about whether you can reduce some
>> code with Lombok around the places you touch; making the codebase more and
>> more maintainable.
>> Let's be good boy scouts. ;-)
>>
>> Let me know if you have questions.
>>
>> Best,
>> Arnold
>>
>>
>>
>> On Sat, Mar 19, 2022 at 10:27 AM Gerald O'Sullivan <
>> osullivan.gerald@gmail.com> wrote:
>>
>>> Dear Friends
>>>
>>> Regarding the use of Lombok in Fineract, note that concerns have been
>>> raised about its use, and its compatibility (or lack of it) with JDK 16.
>>> See this post
>>> <https://www.reddit.com/r/java/comments/m66r8w/is_lombok_in_danger_of_becoming_incompatible_with/> or
>>> this article
>>> <https://levelup.gitconnected.com/be-careful-with-lombok-2e2edfc01110>
>>> for example.
>>>
>>> Personally, I avoid it to be on the safe side. Yes, it does reduce
>>> boilerplate, but that is not enough of a reason for me. Too much of the
>>> code disappears below the waterline for my liking.
>>>
>>> Note that I am NOT saying "don't use it", I am saying "approach with
>>> caution".
>>>
>>> Best
>>> Gerald
>>>
>>> On Thu, 17 Mar 2022 at 15:05, Avik Ganguly <av...@fynarfin.io> wrote:
>>>
>>>> +1
>>>>
>>>> On Wed, Mar 16, 2022 at 6:18 PM Arnold Galovics <
>>>> galovicsarnold@gmail.com> wrote:
>>>>
>>>>> Dear Community,
>>>>>
>>>>> While I've contributed to the codebase, I realized there's a lot of
>>>>> boilerplate code for a lot of classes.
>>>>> Mainly, I see the constructors which are really not doing anything
>>>>> except assigning parameters to fields + the @Autowired annotation. And we
>>>>> have a lot of getters/setters as well, mostly on DTOs.
>>>>>
>>>>> I don't have a number at hand but I think by using Lombok we could
>>>>> reduce the amount of boilerplate in the codebase considerably, I'm just not
>>>>> sure if somebody has considered it before.
>>>>>
>>>>> If there's no objection, I'd start introducing it gradually and then
>>>>> others could also benefit from it.
>>>>>
>>>>> Thoughts?
>>>>>
>>>>> Best,
>>>>> Arnold
>>>>>
>>>>
>>>> Disclaimer:
>>>>
>>>> Privileged & confidential information is contained in this message
>>>> (including all attachments). If you are not an intended recipient of this
>>>> message, please destroy this message immediately and kindly notify
>>>> the sender by reply e-mail. Any unauthorised use or dissemination of
>>>> this message in any manner whatsoever, in whole or in part, is strictly
>>>> prohibited. This e-mail, including all attachments hereto, (i) is for
>>>> discussion purposes only and shall not be deemed or construed to be a
>>>> professional opinion unless expressly stated otherwise, and (ii) is not
>>>> intended, written or sent to be used, and cannot and shall not be used, for
>>>> any unlawful purpose. This communication, including any attachments, may
>>>> not be free of viruses, interceptions or interference, and may not be
>>>> compatible with your systems. You should carry out your own virus checks
>>>> before opening any attachment to this e-mail. The sender of this e-mail and
>>>> *Fynarfin Tech Private Limited* shall not be liable for any damage
>>>> that you may sustain as a result of viruses, incompleteness of this
>>>> message, a delay in receipt of this message or computer problems
>>>> experienced.
>>>>
>>>
>>>
>>> --
>>> Gerald O'Sullivan
>>> Solution Architect
>>> Cellphone: +27 82 412 9962
>>>
>>

Re: Lombok usage?

Posted by Aleksandar Vidakovic <ch...@monkeysintown.com>.
+1

On Fri, Apr 8, 2022 at 4:06 PM Arnold Galovics <ar...@apache.org> wrote:

> Hi guys,
>
> Just wanted to notify everybody, Lombok has landed on develop and already
> showing a great deal of value in terms of reducing the boilerplate code.
>
> I touched some classes to kick-off the refactoring effort; you can find it
> in this PR: https://github.com/apache/fineract/pull/2269
>
> I'd like to take this as a chance to ask everybody to spend 5 more minutes
> more on every PR you do and think about whether you can reduce some code
> with Lombok around the places you touch; making the codebase more and more
> maintainable.
> Let's be good boy scouts. ;-)
>
> Let me know if you have questions.
>
> Best,
> Arnold
>
>
>
> On Sat, Mar 19, 2022 at 10:27 AM Gerald O'Sullivan <
> osullivan.gerald@gmail.com> wrote:
>
>> Dear Friends
>>
>> Regarding the use of Lombok in Fineract, note that concerns have been
>> raised about its use, and its compatibility (or lack of it) with JDK 16.
>> See this post
>> <https://www.reddit.com/r/java/comments/m66r8w/is_lombok_in_danger_of_becoming_incompatible_with/> or
>> this article
>> <https://levelup.gitconnected.com/be-careful-with-lombok-2e2edfc01110>
>> for example.
>>
>> Personally, I avoid it to be on the safe side. Yes, it does reduce
>> boilerplate, but that is not enough of a reason for me. Too much of the
>> code disappears below the waterline for my liking.
>>
>> Note that I am NOT saying "don't use it", I am saying "approach with
>> caution".
>>
>> Best
>> Gerald
>>
>> On Thu, 17 Mar 2022 at 15:05, Avik Ganguly <av...@fynarfin.io> wrote:
>>
>>> +1
>>>
>>> On Wed, Mar 16, 2022 at 6:18 PM Arnold Galovics <
>>> galovicsarnold@gmail.com> wrote:
>>>
>>>> Dear Community,
>>>>
>>>> While I've contributed to the codebase, I realized there's a lot of
>>>> boilerplate code for a lot of classes.
>>>> Mainly, I see the constructors which are really not doing anything
>>>> except assigning parameters to fields + the @Autowired annotation. And we
>>>> have a lot of getters/setters as well, mostly on DTOs.
>>>>
>>>> I don't have a number at hand but I think by using Lombok we could
>>>> reduce the amount of boilerplate in the codebase considerably, I'm just not
>>>> sure if somebody has considered it before.
>>>>
>>>> If there's no objection, I'd start introducing it gradually and then
>>>> others could also benefit from it.
>>>>
>>>> Thoughts?
>>>>
>>>> Best,
>>>> Arnold
>>>>
>>>
>>> Disclaimer:
>>>
>>> Privileged & confidential information is contained in this message
>>> (including all attachments). If you are not an intended recipient of this
>>> message, please destroy this message immediately and kindly notify
>>> the sender by reply e-mail. Any unauthorised use or dissemination of
>>> this message in any manner whatsoever, in whole or in part, is strictly
>>> prohibited. This e-mail, including all attachments hereto, (i) is for
>>> discussion purposes only and shall not be deemed or construed to be a
>>> professional opinion unless expressly stated otherwise, and (ii) is not
>>> intended, written or sent to be used, and cannot and shall not be used, for
>>> any unlawful purpose. This communication, including any attachments, may
>>> not be free of viruses, interceptions or interference, and may not be
>>> compatible with your systems. You should carry out your own virus checks
>>> before opening any attachment to this e-mail. The sender of this e-mail and
>>> *Fynarfin Tech Private Limited* shall not be liable for any damage that
>>> you may sustain as a result of viruses, incompleteness of this message, a
>>> delay in receipt of this message or computer problems experienced.
>>>
>>
>>
>> --
>> Gerald O'Sullivan
>> Solution Architect
>> Cellphone: +27 82 412 9962
>>
>

Re: Lombok usage?

Posted by Arnold Galovics <ar...@apache.org>.
Hi guys,

Just wanted to notify everybody, Lombok has landed on develop and already
showing a great deal of value in terms of reducing the boilerplate code.

I touched some classes to kick-off the refactoring effort; you can find it
in this PR: https://github.com/apache/fineract/pull/2269

I'd like to take this as a chance to ask everybody to spend 5 more minutes
more on every PR you do and think about whether you can reduce some code
with Lombok around the places you touch; making the codebase more and more
maintainable.
Let's be good boy scouts. ;-)

Let me know if you have questions.

Best,
Arnold



On Sat, Mar 19, 2022 at 10:27 AM Gerald O'Sullivan <
osullivan.gerald@gmail.com> wrote:

> Dear Friends
>
> Regarding the use of Lombok in Fineract, note that concerns have been
> raised about its use, and its compatibility (or lack of it) with JDK 16.
> See this post
> <https://www.reddit.com/r/java/comments/m66r8w/is_lombok_in_danger_of_becoming_incompatible_with/> or
> this article
> <https://levelup.gitconnected.com/be-careful-with-lombok-2e2edfc01110>
> for example.
>
> Personally, I avoid it to be on the safe side. Yes, it does reduce
> boilerplate, but that is not enough of a reason for me. Too much of the
> code disappears below the waterline for my liking.
>
> Note that I am NOT saying "don't use it", I am saying "approach with
> caution".
>
> Best
> Gerald
>
> On Thu, 17 Mar 2022 at 15:05, Avik Ganguly <av...@fynarfin.io> wrote:
>
>> +1
>>
>> On Wed, Mar 16, 2022 at 6:18 PM Arnold Galovics <ga...@gmail.com>
>> wrote:
>>
>>> Dear Community,
>>>
>>> While I've contributed to the codebase, I realized there's a lot of
>>> boilerplate code for a lot of classes.
>>> Mainly, I see the constructors which are really not doing anything
>>> except assigning parameters to fields + the @Autowired annotation. And we
>>> have a lot of getters/setters as well, mostly on DTOs.
>>>
>>> I don't have a number at hand but I think by using Lombok we could
>>> reduce the amount of boilerplate in the codebase considerably, I'm just not
>>> sure if somebody has considered it before.
>>>
>>> If there's no objection, I'd start introducing it gradually and then
>>> others could also benefit from it.
>>>
>>> Thoughts?
>>>
>>> Best,
>>> Arnold
>>>
>>
>> Disclaimer:
>>
>> Privileged & confidential information is contained in this message
>> (including all attachments). If you are not an intended recipient of this
>> message, please destroy this message immediately and kindly notify
>> the sender by reply e-mail. Any unauthorised use or dissemination of this
>> message in any manner whatsoever, in whole or in part, is strictly
>> prohibited. This e-mail, including all attachments hereto, (i) is for
>> discussion purposes only and shall not be deemed or construed to be a
>> professional opinion unless expressly stated otherwise, and (ii) is not
>> intended, written or sent to be used, and cannot and shall not be used, for
>> any unlawful purpose. This communication, including any attachments, may
>> not be free of viruses, interceptions or interference, and may not be
>> compatible with your systems. You should carry out your own virus checks
>> before opening any attachment to this e-mail. The sender of this e-mail and
>> *Fynarfin Tech Private Limited* shall not be liable for any damage that
>> you may sustain as a result of viruses, incompleteness of this message, a
>> delay in receipt of this message or computer problems experienced.
>>
>
>
> --
> Gerald O'Sullivan
> Solution Architect
> Cellphone: +27 82 412 9962
>

Re: Lombok usage?

Posted by Gerald O'Sullivan <os...@gmail.com>.
Dear Friends

Regarding the use of Lombok in Fineract, note that concerns have been
raised about its use, and its compatibility (or lack of it) with JDK 16.
See this post
<https://www.reddit.com/r/java/comments/m66r8w/is_lombok_in_danger_of_becoming_incompatible_with/>
or
this article
<https://levelup.gitconnected.com/be-careful-with-lombok-2e2edfc01110> for
example.

Personally, I avoid it to be on the safe side. Yes, it does reduce
boilerplate, but that is not enough of a reason for me. Too much of the
code disappears below the waterline for my liking.

Note that I am NOT saying "don't use it", I am saying "approach with
caution".

Best
Gerald

On Thu, 17 Mar 2022 at 15:05, Avik Ganguly <av...@fynarfin.io> wrote:

> +1
>
> On Wed, Mar 16, 2022 at 6:18 PM Arnold Galovics <ga...@gmail.com>
> wrote:
>
>> Dear Community,
>>
>> While I've contributed to the codebase, I realized there's a lot of
>> boilerplate code for a lot of classes.
>> Mainly, I see the constructors which are really not doing anything except
>> assigning parameters to fields + the @Autowired annotation. And we have a
>> lot of getters/setters as well, mostly on DTOs.
>>
>> I don't have a number at hand but I think by using Lombok we could reduce
>> the amount of boilerplate in the codebase considerably, I'm just not sure
>> if somebody has considered it before.
>>
>> If there's no objection, I'd start introducing it gradually and then
>> others could also benefit from it.
>>
>> Thoughts?
>>
>> Best,
>> Arnold
>>
>
> Disclaimer:
>
> Privileged & confidential information is contained in this message
> (including all attachments). If you are not an intended recipient of this
> message, please destroy this message immediately and kindly notify
> the sender by reply e-mail. Any unauthorised use or dissemination of this
> message in any manner whatsoever, in whole or in part, is strictly
> prohibited. This e-mail, including all attachments hereto, (i) is for
> discussion purposes only and shall not be deemed or construed to be a
> professional opinion unless expressly stated otherwise, and (ii) is not
> intended, written or sent to be used, and cannot and shall not be used, for
> any unlawful purpose. This communication, including any attachments, may
> not be free of viruses, interceptions or interference, and may not be
> compatible with your systems. You should carry out your own virus checks
> before opening any attachment to this e-mail. The sender of this e-mail and
> *Fynarfin Tech Private Limited* shall not be liable for any damage that
> you may sustain as a result of viruses, incompleteness of this message, a
> delay in receipt of this message or computer problems experienced.
>


-- 
Gerald O'Sullivan
Solution Architect
Cellphone: +27 82 412 9962

Re: Lombok usage?

Posted by Avik Ganguly <av...@fynarfin.io>.
+1

On Wed, Mar 16, 2022 at 6:18 PM Arnold Galovics <ga...@gmail.com>
wrote:

> Dear Community,
>
> While I've contributed to the codebase, I realized there's a lot of
> boilerplate code for a lot of classes.
> Mainly, I see the constructors which are really not doing anything except
> assigning parameters to fields + the @Autowired annotation. And we have a
> lot of getters/setters as well, mostly on DTOs.
>
> I don't have a number at hand but I think by using Lombok we could reduce
> the amount of boilerplate in the codebase considerably, I'm just not sure
> if somebody has considered it before.
>
> If there's no objection, I'd start introducing it gradually and then
> others could also benefit from it.
>
> Thoughts?
>
> Best,
> Arnold
>

-- 
Disclaimer:


Privileged & confidential information is contained in this 
message (including all attachments). If you are not an intended recipient 
of this message, please destroy this message immediately and kindly notify
the sender by reply e-mail. Any unauthorised use or dissemination of this 
message in any manner whatsoever, in whole or in part, is strictly 
prohibited. This e-mail, including all attachments hereto, (i) is for 
discussion purposes only and shall not be deemed or construed to be a 
professional opinion unless expressly stated otherwise, and (ii) is not 
intended, written or sent to be used, and cannot and shall not be used, for 
any unlawful purpose. This communication, including any attachments, may 
not be free of viruses, interceptions or interference, and may not be 
compatible with your systems. You should carry out your own virus checks 
before opening any attachment to this e-mail. The sender of this e-mail and 

*Fynarfin Tech Private Limited* shall not be liable for any damage that 
you may sustain as a result of viruses, incompleteness of this message, a 
delay in receipt of this message or computer problems experienced. 

Re: Lombok usage?

Posted by Aleksandar Vidakovic <ch...@monkeysintown.com>.
... one of the biggest decisions here is probably how we should handle
immutability... it's not always consistently applied (I think mainly with
DTOs), but I think in general that was one of the main ideas in Fineract.
Personally, I could live without this "feature"... having immutable classes
(aka "you can set values only on instantiation via the constructor") in
itself leads to redundant code (copies); not all values are always
available when these immutable classes are instantiated which explains
those "copy" functions here and there (sometimes done as static functions,
sometimes package private... all kinds of patterns, not a lot of
consistency)... all this would go away if we just trust and let go and make
these classes simple Java beans (getters/setters ... and I still find
the builder pattern useful here).

If we would opt for maintaining the immutability of those classes (makes
the future introduction of more boilerplate reducing tools impossible) then
we should at least consider using the builder annotation in combination
with just getter annotation. At least we'll have a clue what values we pass
to the respective parameters... in some classes we have a million (my
exaggeration) constructor parameters with the same type (String) which
makes it really easy to shoot ourselves in the foot.

My 2c


On Thu, Mar 17, 2022 at 10:04 AM <si...@skyburgsystems.org> wrote:

> +1
>
>
>
> *From:* Awasum Yannick <aw...@apache.org>
> *Sent:* Wednesday, 16 March 2022 5:54 PM
> *To:* Dev <de...@fineract.apache.org>
> *Subject:* Re: Lombok usage?
>
>
>
> +1
>
>
>
> Great Idea.
>
>
>
> On Wed, Mar 16, 2022, 16:43 Aleksandar Vidakovic <
> cheetah@monkeysintown.com> wrote:
>
> +1
>
>
>
> ... very in favor of doing this... with Lombok we can also get rid of a
> lot of the "@Autowired" stuff... just saying
>
>
>
> On Wed, Mar 16, 2022 at 2:07 PM John Woodlock <jo...@gmail.com>
> wrote:
>
> Arnold,
>
>
>
> I'm not aware if the community has considered this or other tools for
> removing Java boilercode. However, not being a native Java programmer I
> abhor the Java noise.  And I'm sure you'd do a great job demonstrating how
> Lombok can reduce it.
>
>
>
> Thanks a lot
>
> John
>
>
>
> On Wed, Mar 16, 2022 at 12:48 PM Arnold Galovics <ga...@gmail.com>
> wrote:
>
> Dear Community,
>
>
>
> While I've contributed to the codebase, I realized there's a lot of
> boilerplate code for a lot of classes.
>
> Mainly, I see the constructors which are really not doing anything except
> assigning parameters to fields + the @Autowired annotation. And we have a
> lot of getters/setters as well, mostly on DTOs.
>
>
>
> I don't have a number at hand but I think by using Lombok we could reduce
> the amount of boilerplate in the codebase considerably, I'm just not sure
> if somebody has considered it before.
>
>
>
> If there's no objection, I'd start introducing it gradually and then
> others could also benefit from it.
>
>
>
> Thoughts?
>
>
>
> Best,
>
> Arnold
>
>

RE: Lombok usage?

Posted by si...@skyburgsystems.org.
+1

 

From: Awasum Yannick <aw...@apache.org> 
Sent: Wednesday, 16 March 2022 5:54 PM
To: Dev <de...@fineract.apache.org>
Subject: Re: Lombok usage?

 

+1

 

Great Idea.

 

On Wed, Mar 16, 2022, 16:43 Aleksandar Vidakovic <cheetah@monkeysintown.com <ma...@monkeysintown.com> > wrote:

+1

 

... very in favor of doing this... with Lombok we can also get rid of a lot of the "@Autowired" stuff... just saying

 

On Wed, Mar 16, 2022 at 2:07 PM John Woodlock <john.woodlock@gmail.com <ma...@gmail.com> > wrote:

Arnold,

 

I'm not aware if the community has considered this or other tools for removing Java boilercode. However, not being a native Java programmer I abhor the Java noise.  And I'm sure you'd do a great job demonstrating how Lombok can reduce it.

 

Thanks a lot

John

 

On Wed, Mar 16, 2022 at 12:48 PM Arnold Galovics <galovicsarnold@gmail.com <ma...@gmail.com> > wrote:

Dear Community,

 

While I've contributed to the codebase, I realized there's a lot of boilerplate code for a lot of classes.

Mainly, I see the constructors which are really not doing anything except assigning parameters to fields + the @Autowired annotation. And we have a lot of getters/setters as well, mostly on DTOs.

 

I don't have a number at hand but I think by using Lombok we could reduce the amount of boilerplate in the codebase considerably, I'm just not sure if somebody has considered it before.

 

If there's no objection, I'd start introducing it gradually and then others could also benefit from it.

 

Thoughts?

 

Best,

Arnold


Re: Lombok usage?

Posted by Petri Tuomola <pe...@gmail.com>.
+1 yes absolutely… I think we discussed this earlier - the only challenge I believe was that quite a few of the getters / setters actually have business logic in them, so we need to be a bit careful when introducing Lombok.

But it’s definitely doable and would remove a huge amount of the boilerplate code

Regards
Petri

> On 16 Mar 2022, at 23:53, Awasum Yannick <aw...@apache.org> wrote:
> 
> +1
> 
> Great Idea.
> 
> On Wed, Mar 16, 2022, 16:43 Aleksandar Vidakovic <cheetah@monkeysintown.com <ma...@monkeysintown.com>> wrote:
> +1
> 
> ... very in favor of doing this... with Lombok we can also get rid of a lot of the "@Autowired" stuff... just saying
> 
> On Wed, Mar 16, 2022 at 2:07 PM John Woodlock <john.woodlock@gmail.com <ma...@gmail.com>> wrote:
> Arnold,
> 
> I'm not aware if the community has considered this or other tools for removing Java boilercode. However, not being a native Java programmer I abhor the Java noise.  And I'm sure you'd do a great job demonstrating how Lombok can reduce it.
> 
> Thanks a lot
> John
> 
> On Wed, Mar 16, 2022 at 12:48 PM Arnold Galovics <galovicsarnold@gmail.com <ma...@gmail.com>> wrote:
> Dear Community,
> 
> While I've contributed to the codebase, I realized there's a lot of boilerplate code for a lot of classes.
> Mainly, I see the constructors which are really not doing anything except assigning parameters to fields + the @Autowired annotation. And we have a lot of getters/setters as well, mostly on DTOs.
> 
> I don't have a number at hand but I think by using Lombok we could reduce the amount of boilerplate in the codebase considerably, I'm just not sure if somebody has considered it before.
> 
> If there's no objection, I'd start introducing it gradually and then others could also benefit from it.
> 
> Thoughts?
> 
> Best,
> Arnold


Re: Lombok usage?

Posted by Awasum Yannick <aw...@apache.org>.
+1

Great Idea.

On Wed, Mar 16, 2022, 16:43 Aleksandar Vidakovic <ch...@monkeysintown.com>
wrote:

> +1
>
> ... very in favor of doing this... with Lombok we can also get rid of a
> lot of the "@Autowired" stuff... just saying
>
> On Wed, Mar 16, 2022 at 2:07 PM John Woodlock <jo...@gmail.com>
> wrote:
>
>> Arnold,
>>
>> I'm not aware if the community has considered this or other tools for
>> removing Java boilercode. However, not being a native Java programmer I
>> abhor the Java noise.  And I'm sure you'd do a great job demonstrating how
>> Lombok can reduce it.
>>
>> Thanks a lot
>> John
>>
>> On Wed, Mar 16, 2022 at 12:48 PM Arnold Galovics <
>> galovicsarnold@gmail.com> wrote:
>>
>>> Dear Community,
>>>
>>> While I've contributed to the codebase, I realized there's a lot of
>>> boilerplate code for a lot of classes.
>>> Mainly, I see the constructors which are really not doing anything
>>> except assigning parameters to fields + the @Autowired annotation. And we
>>> have a lot of getters/setters as well, mostly on DTOs.
>>>
>>> I don't have a number at hand but I think by using Lombok we could
>>> reduce the amount of boilerplate in the codebase considerably, I'm just not
>>> sure if somebody has considered it before.
>>>
>>> If there's no objection, I'd start introducing it gradually and then
>>> others could also benefit from it.
>>>
>>> Thoughts?
>>>
>>> Best,
>>> Arnold
>>>
>>

Re: Lombok usage?

Posted by Aleksandar Vidakovic <ch...@monkeysintown.com>.
+1

... very in favor of doing this... with Lombok we can also get rid of a lot
of the "@Autowired" stuff... just saying

On Wed, Mar 16, 2022 at 2:07 PM John Woodlock <jo...@gmail.com>
wrote:

> Arnold,
>
> I'm not aware if the community has considered this or other tools for
> removing Java boilercode. However, not being a native Java programmer I
> abhor the Java noise.  And I'm sure you'd do a great job demonstrating how
> Lombok can reduce it.
>
> Thanks a lot
> John
>
> On Wed, Mar 16, 2022 at 12:48 PM Arnold Galovics <ga...@gmail.com>
> wrote:
>
>> Dear Community,
>>
>> While I've contributed to the codebase, I realized there's a lot of
>> boilerplate code for a lot of classes.
>> Mainly, I see the constructors which are really not doing anything except
>> assigning parameters to fields + the @Autowired annotation. And we have a
>> lot of getters/setters as well, mostly on DTOs.
>>
>> I don't have a number at hand but I think by using Lombok we could reduce
>> the amount of boilerplate in the codebase considerably, I'm just not sure
>> if somebody has considered it before.
>>
>> If there's no objection, I'd start introducing it gradually and then
>> others could also benefit from it.
>>
>> Thoughts?
>>
>> Best,
>> Arnold
>>
>

Re: Lombok usage?

Posted by John Woodlock <jo...@gmail.com>.
Arnold,

I'm not aware if the community has considered this or other tools for
removing Java boilercode. However, not being a native Java programmer I
abhor the Java noise.  And I'm sure you'd do a great job demonstrating how
Lombok can reduce it.

Thanks a lot
John

On Wed, Mar 16, 2022 at 12:48 PM Arnold Galovics <ga...@gmail.com>
wrote:

> Dear Community,
>
> While I've contributed to the codebase, I realized there's a lot of
> boilerplate code for a lot of classes.
> Mainly, I see the constructors which are really not doing anything except
> assigning parameters to fields + the @Autowired annotation. And we have a
> lot of getters/setters as well, mostly on DTOs.
>
> I don't have a number at hand but I think by using Lombok we could reduce
> the amount of boilerplate in the codebase considerably, I'm just not sure
> if somebody has considered it before.
>
> If there's no objection, I'd start introducing it gradually and then
> others could also benefit from it.
>
> Thoughts?
>
> Best,
> Arnold
>