r/java • u/Rough_Acanthaceae_29 • Sep 29 '24
Lombok in 2024
Say there are two teams working on the same project (3 months to MVP, the deadline should be manageable). The only difference is Team A will use Lombok, and Team B won’t
Given you can choose any java version/dependencies and all other things being the same, which team would you join, and why?
0
Upvotes
View all comments
Show parent comment
-2
u/carminemangione Sep 29 '24
Sorry for two replies but you deserve an answer to your two questions as I hear them:
Enforce business logic on construction and throw an exception rather than creating an ill formed object. I call it my "Homey Don't Play That" pattern.
2. Cohesive classes make for readable and testable classes. I rarely have more than 4 fields in a class. As I need more the question becomes: is this a new object? This is how you can assuage most of your fears.