10 Essential Java Libraries You Should Know

I recently read and shared You’re Wasting Time in #Java Without These 10 Libraries. I commented on it a bit in my newsletter, but given the amount and intensity of reactions, I think a full-blown post is in order. The referenced libraries are: * Project #Lombok * #MapStruct * #JUnit 5 & #Mockito * #SLF4J with Logback * Apache Commons Lang & Google #Guava * #Jackson * Hibernate Validator * #SpringFramework * Apache HttpClient / OkHttp * #Liquibase or #Flyway (link in the comments)

  • No alternative text description for this image

And there is my DTOGen lib. You add some annotations on your entities to generate standard DTOs records at build time, with the same entities validation and always in sync with them (for custom DTOs you just keep writing regular code). For free you get reflection-less mapping methods, so you don’t even need MapStruct. Check it out at https://github.com/manoelcampos/DTOGen

- Lombok causes more harm than good - mapstruct ... don't use it and see no reasons to start - Apache Commons and Guava are mostly useless now - Hibernate Validator is an antipattern for "parse, don't validate" code - Spring should be avoided

So true that I use all

Like
Reply

I saw lombok once and I did not like it. It basically hides some boiler plate code into a separate library. I would prefer the full code present even if it is a little more verbose.

👇 😋 👎

  • No alternative text description for this image
Like
Reply
See more comments

To view or add a comment, sign in

Explore content categories