Replies: 5 comments 1 reply
-
I vote for using Lombok. Here are my answers to pros Con#1 Install a plugin for Lombok. The plugin for IntelliJ and Eclipse is easy to install. They are free. Con#2 We should NOT use @DaTa annotation at most of the POJO classes. Instead, we should use the combination of individual annotations(@getter, @Setter, @noarg , @AllArg...). The @DaTa annotation contains all other individual annotations, but we may not need all individual annotations. Con#3, The safety concern still comes from @DaTa annotation, we indeed should limit the use of @DaTa annotation, and should use individual annotation. |
Beta Was this translation helpful? Give feedback.
-
Another benefit of using Lombok Lombok contains the @slf4j annotation, which replaced the Logger statement. |
Beta Was this translation helpful? Give feedback.
-
The main code base is in Java, but we are extending it out to other technologies. e.g. Javascript, Python, etc. How would this affect the experience of building out new code in these different technologies? I see a win in being able to generate domain-level classes from a single source protocol buffers or something similar for multiple languages without needing to manually code to keep APIs in sync across languages. Could Lombok do something similar? |
Beta Was this translation helpful? Give feedback.
-
One more benefit of using Lombok: The builder pattern. @getter Use of builder pattern: |
Beta Was this translation helpful? Give feedback.
-
Why should we not use Lombok?
We now have |
Beta Was this translation helpful? Give feedback.
-
In current IridiumIdentity JAVA code, all JAVA entity classes (POJO) were provided with Getters/Setters , making these entity classes verbose, which also increases coding effort to programmers.
Lombok is a java tool, which helps create those common methods automatically. By adding a few simple Lombok annotations, those methods such as Getters/Setters, No Arg/All Arg contructor, tostring,and equals/hashCode will be generated by Lombok.
The pros and cons of Lombok are still under debate. I listed in blew for you to discuss.
Pros:
Cons: (according to the discussion online)
4. Safety issue. Somebody raised the concern of safety of Lombok. (Possibly, the @DaTa annotation generate setters/getters for every fields).
Beta Was this translation helpful? Give feedback.
All reactions