You DON'T Need Lombok

preview_player
Показать описание
Discover the power of clean code, concise code as we explore the pros and cons of using Project Lombok in your Java projects.

In this video I dissect the intricacies of Lombok and showcase alternative techniques to achieve the same results, without adding unnecessary dependencies.

Don't Forget to
===========================================

🙊 Here are the goods for all my videos video 🙊

► Recommended Books
===========================================

► Computer and Monitor
===========================================

► Camera Gear
=============================================

► IDE & Tools I use for coding 💻 🎒
===========================================
- ITerm
- VsCode
- GoLand
- IntelliJ Ultimate
- Sublime

P.S
===========================================

❤️ Thanks for watching

#java #lombok #programming
Рекомендации по теме
Комментарии
Автор

Hard disagree on not using Lombok, at least at my job. When you go into these ancient classes that have tons of methods and surrounded by all these getters/setters/builders, it makes it so much more difficult to parse and work around. Having Lombok clean things up is really valuable and makes code easier to maintain and read. I simplifies things and does a good job of that. Being worried that Lombok will break your app in a future update is a silly reason not to use it. I can agree maybe don't use if starting on a small app or something but it has its purpose.

dtPlaythroughs
Автор

I have been coding Java for more than 15 years I know what Lombok generates. I can create my own builder pattern, to string, equal and hashcode, but why should I? I can have lombok generate those for me. Also lombok makes it super easy to add or remove fields in the model, try doing that with your own builder pattern, to string and equal/hashcode implementation.

USONOFAV
Автор

Good to know another perspective as well. But personally i feel Lombok makes your POJO/Entity looks much cleaner. Generating using IDE is an option but when you need to update some fields then you have to go through complete class and find the affected areas(eg: toString() or equals()).
Moreover, Lombok is not a complex library so it's very easy for new Developers to understand and start using it. Official documentation explains everything so well :-)
UpVote for Lombok👍

praveensrivastava
Автор

You need to remember to regenerate the methods every time you add or remove a field in any class, which is a huge pain in the ass. As for records, my company is still on Java 8/11, but can you even annotate the fields properly for things like JPA or Jackson?

electricant
Автор

Generating toString and hashCode with an IDE will be as dangerous as lombok's annotations if you don't know what are you doing.

arek
Автор

If you want to have full control over your code move to C++. Java is all about improvement, abstraction (SOLID by the way) and easy implementation and iteration. Instead of rewriting toString or equals when something changes you can rely on a popular dependency to handle it for you. If we go on with the full control, switch from spring boot to handling sockets yourself, we rely on dependencies and nothing wrong with it generally.

noamyiz
Автор

we don't NEED most things, lack of lombok, spring boot, maven, libraries... you can still make a finished product. BUT they shorten the time we have to work and make us happier.

ninggiangboy
Автор

I have been coding Java for a year. Luckily, my team lead has concern about all those abstractions to make sure that new comer will be easily understand what’s show in the codebase and contribute to team early enough. It annoys that you have to write constructor every times until record comes in to play.

means
Автор

Honestly, never get bored watching how you teach, really enjoy it

dennnoval
Автор

I think that simple annotations like getter setter noargs and allargs are simple to understand, and it saves a lot of space in the class, especially if you have like 10 or more properties.But as you said, some other annotations can be dangerous so you must be careful with that.

francescovanspronsen
Автор

So using lombok helps in reducing redundant code and static ones like getters, setters, constructors, etc. And it also helps in fast development. Now on the other hand you raised some very valid points. At the end of the day it really comes down to who is using lombok if you have a team of juniors without anyone with experience reviewing what was used and its impact then its better to remain with the normal approach. Moreover, when managing a huge project lombok is a huge help, specially for boilerplate codes. At least that's my way of seeing it 😅

chadiosseiran
Автор

I love Lombok though 😅. But thanks for the insight always man🙏🏽🙏🏽

JEBJOSH
Автор

You are a great teacher. I have a question for you.

Which course of yours would you recommend to me, I know a bit of java, but I want to learn Spring Boot, so I can learn to create my own API's with some backend? (i'm a front end developer). I want to be fullstack.

wmw
Автор

Hi Amigoscode ! I really enjoy your videos on programming in Java. I was wondering if you could make a video about asynchronous methods. I've been able to use them successfully, but I sometimes have trouble creating efficient callbacks. My callbacks can be long or be executed after the instructions I need.
Thanks for your time!

lelowick
Автор

Assalamualaikum, I think Lombok can be useful when you need to change for instance a POJO a lot. It's better earlier on but maybe when refactoring after implemention you could auto generate.

RibPullRick
Автор

Should we use Jackson library then? or create your own mapper?

miteshpatel
Автор

what about adding @Data which inside include base annotations ?

Katanciaa
Автор

I tried the simple calculator program in Android studio but I can't use the I'd of the button switch case in the onClick method how should resolve this error

_hariprasath.j
Автор

I think if you want Lombok better to switch to Kotlin. Lombok is not silver bullet for the class creation. Unfortunately there are a lot of the projects where all decisions were made before we came on the project so all we have just to work with what we have

kensaitakeso
Автор

Hi Amigo! 👋 i tried to sign up for the fullstack course and subscribed to get the pdf and the discount, i even confirmed my email but tge second email was never sent to me. Can you please help?

justinhearst