You DON'T Need Lombok

Поділитися
Вставка
  • Опубліковано 6 сер 2023
  • 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
    ===========================================
    💯 Subscribe to Amigoscode - bit.ly/2HpF5V8
    💯 Courses Available for free here - amigoscode.com/courses
    💯 Join Private Facebook Group and Discord - amigoscode.com/p/join-community
    🙊 Here are the goods for all my videos video 🙊
    ► Recommended Books
    ===========================================
    - Clean Code - amzn.to/2UGDPlX
    - HTTP: The Definitive Guide - amzn.to/2JDVi8s
    - Clean Architecture - amzn.to/2xOBNXW
    ► Computer and Monitor
    ===========================================
    - New Apple MacBook Pro - amzn.to/3464Mmn
    - Dell 27 INCH Ultrasharp U2719D Monitor - amzn.to/2xM3nW1
    - Double Arm Stand Desk Mount - amzn.to/3aYKKfs
    - USB C Hub Multiport Adapter - amzn.to/2Jz7NlL
    ► Camera Gear
    =============================================
    - Sony ILCE7M3B Full Frame Mirrorless Camera - amzn.to/346QIJn
    - Sigma 16 mm F1.4 DC DN - amzn.to/2wbic3Q
    - Sigma 33B965 30 mm F1.4 DC DC - amzn.to/39G37Fd
    ► IDE & Tools I use for coding 💻 🎒
    ===========================================
    - ITerm
    - VsCode
    - GoLand
    - IntelliJ Ultimate
    - Sublime
    P.S
    ===========================================
    💯 Don't forget to subscribe | bit.ly/2HpF5V8
    💯 Join Private Facebook Group and Discord - amigoscode.com/p/join-community
    💯 Follow me on Instagram | bit.ly/2TSkA9w
    ❤️ Thanks for watching
    #java #lombok #programming
  • Наука та технологія

КОМЕНТАРІ • 208

  • @dtPlaythroughs
    @dtPlaythroughs 10 місяців тому +212

    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.

    • @actualprogramming
      @actualprogramming 10 місяців тому +6

      Agreed. I am working on a old project which doesn't uses, it's just difficult to read. And I don't need to see the fluff stuff.

    • @RochaNahuel
      @RochaNahuel 10 місяців тому +3

      El simplemente a veces ya no sabe que contenido subir

    • @lukeav6097
      @lukeav6097 5 місяців тому +2

      I disagree. If you have that many fields in your class there's something wrong with your code. Lombok is the stupidest lirary out there

    • @yardy88
      @yardy88 2 місяці тому

      IntelliJ allows you to search through symbols like field and method names using Ctrl + F12. There you go, you no longer need lombok. Also your classes are too big. Kthxbye

  • @USONOFAV
    @USONOFAV 10 місяців тому +138

    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.

    • @a_cen
      @a_cen 10 місяців тому +6

      I Agree)) Also if u really scared that some new version of lombok generates something bad - cower that logic by tests.

    • @wardibald
      @wardibald 10 місяців тому +6

      Who debugs a setter anyway? Debug the line below where the value is declared you're going to set, or the method providing it. A setter should remain a setter except in extraordinary circumstances, and Lombok removes the urge of some juniors to put extra logic in it. It may add some complexity, but it also removes some and encourages cleaner code.
      On entities, it's mostly a matter of EqualsAndHashcode-onlyExplicitlyIncluded and toString-exclude to allow entity equality and avoid cartesian product issues. If a junior doesn't understand these things, Lombok's the least of your worries if they start messing with entities.

    • @tsalVlog
      @tsalVlog 10 місяців тому

      Java 15 + Intellij makes it unnecessary to force a build pipeline that needs to generate lombok classes. It was great, just like Spring was great when it was needed. Now, it really isn't.

    • @Dalendrion
      @Dalendrion 10 місяців тому

      @@tsalVlog I'd love to learn more about this.

    • @m3hdim3hdi
      @m3hdim3hdi 10 місяців тому

      @@tsalVlog is Spring not needed any more? And if yes how do you replace it

  • @praveensrivastava5994
    @praveensrivastava5994 10 місяців тому +31

    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👍

    • @lukeav6097
      @lukeav6097 5 місяців тому

      It makes it cleaner while at the same time adding complexity and extra logic to your code

  • @dennnoval
    @dennnoval 7 місяців тому +1

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

  • @electricant55
    @electricant55 10 місяців тому +12

    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?

  • @chadiosseiran3928
    @chadiosseiran3928 10 місяців тому +5

    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 😅

  • @noamyiz
    @noamyiz 10 місяців тому +23

    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.

    • @lukeav6097
      @lukeav6097 5 місяців тому

      No need to move to c++ and he's not saying do that. But adding hidden logic and complexity to your code avoid writing a few lines code is stupid AF

    • @halavich9672
      @halavich9672 5 місяців тому +2

      @@lukeav6097 Stop using Spring then, KEK

  • @means3152
    @means3152 10 місяців тому +2

    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.

  • @JEBJOSH
    @JEBJOSH 10 місяців тому +11

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

  • @francescovanspronsen
    @francescovanspronsen 10 місяців тому +9

    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.

    • @momokoko9864
      @momokoko9864 4 місяці тому +1

      I agree, I only use those you mentioned and avoid using @tostring or even @Data xd

  • @w3mw
    @w3mw 9 місяців тому

    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.

  • @4wrk
    @4wrk 10 місяців тому

    I'm a beginner Java developer, and I starts my familiarity with the lombok less then 3 month ago. This is really useful thing at the first look, but i don't now how it exactly works under the hood. Anyway i use it for my pet-projects and this is really conveniently :)

  • @lelowick
    @lelowick 9 місяців тому

    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!

  • @007arek
    @007arek 10 місяців тому +8

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

  • @miteshpatel4654
    @miteshpatel4654 6 місяців тому

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

  • @ninggiangboy
    @ninggiangboy 10 місяців тому +4

    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.

  • @chopsuey167
    @chopsuey167 9 місяців тому

    I quite agree to use lombok. Is really useful however like you say we need to be careful when is applied it in entity classes.

  • @marksduarte
    @marksduarte 10 місяців тому +1

    I agree that using the IDE to generate these codes is a good way to know what's going on and even makes it easier to debug the code, but I'm also in favor of using Lombok for simple things like Getters, Setters and Constructors.

  • @peterrsmiranda
    @peterrsmiranda 10 місяців тому

    I like Lombok because is simpliest, but I agree with you too about the dangers and it is important to maintain control and knowledge of your own code.

  • @Katanciaa
    @Katanciaa 10 місяців тому +1

    what about adding @Data which inside include base annotations ?

  • @RibPullRick
    @RibPullRick 10 місяців тому +8

    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.

    • @Runnable19
      @Runnable19 10 місяців тому

      I agree

    • @tsalVlog
      @tsalVlog 10 місяців тому

      For POJOs / protocols that change often, I do agree Lombok could help.

  • @t0nn1x
    @t0nn1x 10 місяців тому

    Which icon theme do you use?

  • @luisfeliperodrigues7831
    @luisfeliperodrigues7831 10 місяців тому

    what do you think about mapstruct?

  • @user-fp1oe6dc2u
    @user-fp1oe6dc2u 10 місяців тому

    OMG!! I thought this day would never come.
    Please, I have more reasons to use Lombok!

  • @justinhearst
    @justinhearst 9 місяців тому

    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?

  • @nonameiskickass1319
    @nonameiskickass1319 7 місяців тому +1

    As usual, the difference between youtube coder and professional coder is conspicuous

  • @17_hariprasath.j41
    @17_hariprasath.j41 10 місяців тому

    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

  • @user-mc8hz9eo8q
    @user-mc8hz9eo8q 9 місяців тому

    Thanks. What's the theme for IntelliJ please.

  • @vern0312
    @vern0312 10 місяців тому

    I know it's easy to generate with the IdE but I just like Lombok. I find it much simpler

  • @kensaitakeso
    @kensaitakeso 8 місяців тому +3

    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

  • @HackMac74
    @HackMac74 Місяць тому

    I just want as little boilerplate code as possible. So I love Lombok and will use it. Don't see no danger or steep learning curve for annotations here. Pretty clear.

  • @innovativatk
    @innovativatk 9 місяців тому

    hi, like your videos... can you make video on pluggins on IntelliJ that you recomend please

  • @mwildam
    @mwildam 5 місяців тому

    Completely with you - and it is not only about the Lombok - usually there are plenty of different annotations where the same annotation might even be interpreted by multiple libraries and frameworks in the same project. Unfortunately Lombok is used in all recent projects where I am involved. People only look at the number of lines they need to write while that is not the problem and not what is holding back and hindering development. I have seen classes with more annotations than regular code lines and then you are not coding any more - you are writing configuration files! - And the pitty of configuration files is that you do not see what is actually done until you look it up in documentation or some (decompiled) classes. On the other hand, looking at the code always tells you what is actually done in the first place.

  • @Tista_acc
    @Tista_acc 10 місяців тому +1

    Valid reasons but I doubt they would stop anyone from using it. More preferential than a need.

  • @dmitrik4610
    @dmitrik4610 10 місяців тому

    you can use chain in setters instead of builder

  • @Divyv520
    @Divyv520 10 місяців тому

    Hey , Amigoscode nice video! I was wondering if I could help you edit your videos and also make a highly engaging shorts out of them.

  • @govindgupta290
    @govindgupta290 10 місяців тому +1

    Well the debugging can be a reason to avoid lombok but it for last unless needed. Do use lombok effectively till it does not cause trouble.

  • @michatchorzewski4272
    @michatchorzewski4272 8 місяців тому

    Hey, could you make video about Kotlin and how it might impact java popularity ? I'm a java developer with close to 4 years of experience and quite recently I've started learning Kotlin. Quite frankly I become more and more convinced it is the future. Have you given any thoughts to that ?

  • @LearncodewithMuneeb
    @LearncodewithMuneeb 8 місяців тому

    Thanks sir for making useful videos for us.
    But I request you very respectfully to work in a project in spring boot having at least 6 entities/tables using spring boot in the back end and React/Angular/Next in the front end

  • @tshembhomanganyi6154
    @tshembhomanganyi6154 10 місяців тому +11

    I recently discovered Lombork a year or 2 years ago. Since then, it has saved me a lot of time. Having to reduce boilerplate code it's the best. I think there is so much benefits when compared to the dangers of using it. For me the feeling is almost the same as switing from JEE to Spring Boot.

  • @dabeatfan
    @dabeatfan 9 місяців тому

    @Amigoscode is vs code enough for u as a spring java developer comparing with ideaj?

    • @dabeatfan
      @dabeatfan 9 місяців тому

      this is ideaj i see

  • @fkb_ali
    @fkb_ali 21 день тому

    I think it's acceptable to use Lobmok in small projects or in demo projects for learning. in case to not trash in entity classes. so you can see clearly business logic

  • @drakenra
    @drakenra 7 місяців тому

    I hated Lombok when I was using Eclipse because you need to do extra configuration but after I switched to IntelliJ IDEA then I started to like Lombok as you don't need any extra configurations as it just works.

  • @misaelpereira9679
    @misaelpereira9679 10 місяців тому

    The problem with records is that as records are inmutable by default then it does not give you setters, and is equally tedious to recreate the entire object just to change one of the fields, So i think that for that reason people still stick with lombok. Kotlin by other hand do the things more elegantly with data classes

  • @rurangirwabailly2339
    @rurangirwabailly2339 8 місяців тому

    As we lean into AI-assisted coding, the clarity and conciseness of our codebase become crucial. Lombok, by trimming boilerplate, ensures we're maximizing AI's context window, making a strong case for its integration in modern development.

  • @lucasteixeira1631
    @lucasteixeira1631 8 місяців тому

    awesome video, as always!
    but you saying that @ToString @Getter @Setter, and more of boiler plate annotations are bad, and using `record` isn't the same thing? I mean, you got a lot of things being auto generated for you as well, like overriding toString() and such.

  • @THGWICKED50CAL
    @THGWICKED50CAL 10 місяців тому

    Maybe a compromise would be to only use it when you need a builder?

  • @nannuchampaku8980
    @nannuchampaku8980 9 місяців тому

    Pls give a video how the interview happend for Java developer in uk

  • @DeGoya
    @DeGoya 10 місяців тому +4

    I've worked for a few very big companies and all of them use lombok. You can't always use records, nor is it always the best option

  • @TheLanter
    @TheLanter 10 місяців тому

    I would said half lambok just for getters, setters and two cuncstroctor. Because project is in starting mode is just frustrating adding in cuncstroctor and geters and setters.

  • @sqfzerzefsdf
    @sqfzerzefsdf 10 місяців тому

    yes you do, development time writing boilerplate goes down way too much to not use it

  • @AleksandarT10
    @AleksandarT10 10 місяців тому

    I agree with your points, since all of that can be generated by the IDE - i don't see any real benefit. Anyway at the end of the day it depends on the team decision.

  • @ekasatriabahari2264
    @ekasatriabahari2264 10 місяців тому +16

    I thought lombok means lombok island in Indonesia where i live
    And i thought you just don't need the things in here 😂

    • @nurhadi-dev
      @nurhadi-dev 10 місяців тому

      there are some terms in java programming language related to Indonesia. java itself and lombok, are island names in Indonesia. and also, Jakarat Enterprise Edition (JakartaEE, formerly JavaEE) is capital city of Indonesia.

  • @RagingJaggi
    @RagingJaggi 8 місяців тому

    at least for using getters/setter don't think it's problematic that you can't set break point within, makes code a lot less messy

  • @timurasanov3948
    @timurasanov3948 10 місяців тому +2

    Hi guys. In addition to all the reasons listed in the video, - I would also add that it's more difficult to debug with Lombok IMHO

  • @kiseru6128
    @kiseru6128 10 місяців тому

    This video got me thinking. Do I really need Lombok?

  • @teddy6326
    @teddy6326 9 місяців тому

    Bro, do you know any good bootcamp school???

  • @nehurane
    @nehurane 10 місяців тому

    I would give edge to Lombok. Unless you have some specific reason not to use it which I cannot think of. I am being using for more than 3 years and had no issue.

  • @jatinjangir5028
    @jatinjangir5028 9 місяців тому

    hi I'm Fresher am learning Java , I graduated this year i don't Know what to do Development or Dsa From Which One I Learn Can you Please guide me. I want Job as soon as possible and am learning Java .
    Can i Continue Java or start development.

  • @buharinasir3829
    @buharinasir3829 10 місяців тому

    Assalamu Alaikum. We use Lombok just to reduce boiler code

  • @shareeftaahir6429
    @shareeftaahir6429 3 місяці тому

    I agree with your point to some extent. But isn't the purpose of using libraries the same as why we use frameworks? Because if developers were to abide strictly with your logic on this subject, they'd have to build their applications from scratch implementing all functions and features. This will be the only guarantee that a developer would have complete visibility and ownership of his source code. I guess at some points we need to find a middle ground and just do our best to understand the libraries we use. But I'm just a Java student at this moment. Perhaps my point of view may not be as low-level as senior devs. What do you think about my pov?

  • @davidnjau5850
    @davidnjau5850 10 місяців тому +1

    Lombok 'toString' did me wrong on many to many relationship. I spent hours trying to figure out what was wrong.

  • @shonderlpt
    @shonderlpt 10 місяців тому

    I think that to use lombok or not depend of the needs and expertise level in the development of the any proyect. You can make e mistake in the use of toString using lombok or not.

  • @rysiu133
    @rysiu133 Місяць тому

    1. for debugging purposes you can just 'delombok' and rebuild, then go back to using lombok, it still reduces boilerplate, and prevents you from having to add/delete code over and over in case ur class changes.
    2. if an annotation can be dangerous if not used properly, then you simply shouldnt be using it if you arent sure what it does, but it works the same way for manually created code.
    3. i dont get how using annotations like '@Getter' or 'AllArgsConstructor' adds complexity for your team, its very straightforward, and you dont even need to know what is annotation processing to use it. the only explanation i can possibly see is someone not knowing what getters/constructors even are, but in this case i highly doubt its someone who should be hired in the first place.

  • @shreecharan6224
    @shreecharan6224 8 місяців тому

    @Data is a go to annotation that I use with Lombok

  • @Neil.Menezes
    @Neil.Menezes 9 місяців тому +1

    Yes I use Lombok.. And hard disagree on not using it.. I think if you know what you're doing, it makes the codebase look very clean. And the arguments for dependency and learning curve are applicable to any framework. Ultimately, if it's worth it.. You accept the dependency and learn the intricacies.

  • @cheatisawesome1645
    @cheatisawesome1645 10 місяців тому +7

    The only potential problem with lombok is in large projects where this mountain of potentially useless code slows down the buid a lot.
    Leaving that aside you obviously have never worked under QA control, good luck testing all those methods manually and doing 80%+ coverage, even doing an abstract test is full of exceptions that have to be handled manually.
    Instead just configure lombok for it to add @Generated automatically and skip a ton of work.
    Most importantly, is it easier for lombok to give you problems or for updating a model to forget to regenerate all the methods? in my opinion the second one

  • @moistness482
    @moistness482 4 місяці тому

    Using lombok adds additional complexity into setting up your text editor to deal with it. It's easy enough with IntelliJ, and I assume vscode, but once you start going into more advanced editors like neovim, it is a problem I would much rather not deal with. A much better alternative I would use, even if it goes all good object oriented programming practices, is making those fields public instead, since lombok pretty much effectively does that for me anyway.

  • @emmanuelU17
    @emmanuelU17 10 місяців тому

    Love Lombok Builder annotation

  • @DenKhaziev
    @DenKhaziev 6 місяців тому

    Oh yeah, toString with ManyToMany association is a tough thing 😂 When I found that the reason of stack overflow was a generated toString method by Lombok - I really didn't know what to do - to be mad or to laugh. But anyway, in many cases Lombok is helpful, just need to know some "dangerous" features. Thank you for alternative view on Lombok in this video.

  • @gerdsfargen6687
    @gerdsfargen6687 5 місяців тому

    Java Record class instead?

  • @internetms52
    @internetms52 10 місяців тому

    Lombok's interaction with other libraries is not always effective, and the reasons for its ineffectiveness vary.
    For instance, when mixing Lombok with the Jackson Library, adding the @Data annotation is necessary to avoid errors. However, using @Builder alongside XML property annotations can lead to issues.
    Furthermore, attempting to use @SuperBuilder to mitigate constructor impacts, but it is found that @SuperBuilder cannot be used with elements in collections.
    See? These hurdles arise due to Lombok, which adds unexpected learning curves to what initially appeared to be convenient features. These complications can be avoided.

  • @KrishnaNCool
    @KrishnaNCool 9 місяців тому

    Which IDE is this

  • @kurolo3018
    @kurolo3018 10 місяців тому

    Im from the old school, I like to click source -> generate getters and setters on eclipse.I don't know it feels like is the way to go

  • @codegmeister
    @codegmeister 10 місяців тому

    Honestly it depends on your usage. Everyone has their own favorite after all

  • @hieuthaingoc
    @hieuthaingoc 10 місяців тому +2

    I always go from scratch with the core domain since I don't want it to depends on anything. On outer layers, lombok is very handy

  • @John_Smith_Java
    @John_Smith_Java 7 місяців тому

    And what's about writing plain Java code instead of using Spring or any other frameworks?😊 Where's the borderline?

  • @takundaalban
    @takundaalban 10 місяців тому

    I think its a 50/50. To keep it simple, maybe you want to remove 3 fields from a class or rather add. With Lombok the getters and setters are injected upon declaring the instance field. You need a few seconds more of typing if you don’t have lombok - to attach those to getters and setters hahaha

  • @manuelleongodinho4637
    @manuelleongodinho4637 6 місяців тому

    I believe Lombok works well for 90% of the cases, but for instance I worked in a project that needed some fields for databases optimisations that made it not enjoyable experience using Lombok.
    At this point I believe you should give a try to kotlin that removes these verbose parts of Java

  • @IvanRandomDude
    @IvanRandomDude 10 місяців тому +1

    When Java implements something like properties in C# maybe then I won't use lombok. Until then I absolutely will.

  • @Daranix
    @Daranix 10 місяців тому +5

    I totally disagree with the title and the message transmitted on the video itself.
    ofc lombok is something don't you need, is only a way to avoid boilerplate code and do the things quick, also have in mind there's to many companies which still stuck using Java 8/11 (in general versions minor than 14 which was the version who included records), so records is not an option.
    In general correct me if I'm wrong, but I think the message you tried to spread in this video was more like "don't use a tool if you and your team doesn't understand the implications well", if is this the case atleast the words choosen for this purpose was not the right ones, from my perspective all the reasons exposed on the video can be summarized with the unfamiliarity, and personally i think there's not much extra work on read a little bit of the docs of lombok to be familiar with it.
    (And sorry if my comment looks "aggresive" was not the purpose on my comment, but I didn't find another words to express my opinion).

    • @GuihVicentini
      @GuihVicentini 10 місяців тому +1

      I understood the message more like, don’t use a library that you don’t need.
      I myself, a lazy programmer, love to use libraries to help me do things, but sometimes, for small things, these libraries and the learning curve can get on the way and delay things instead of speeding it. This is what I understood from the message, or how it applies to my experience.
      Nevertheless, the overall situation should be evaluated and maybe the learning curve and hassles in the beginning will pay off in the future
      Cheers!

  • @SardorUbaydullayev-zf7kz
    @SardorUbaydullayev-zf7kz 10 місяців тому

    sometimes i use but i dont use when inject services

  • @piotrjaga6929
    @piotrjaga6929 10 місяців тому

    Of course at first sight lombok can be useful, but all of these things IDE can generate, and classes that have getters and setters for all the fields shoud have only that and nothing else. if you have some POJO class its clear to have fields on top, getters and setters on bottom and contructors in between. But i have been coding for one and half year and i didint even got my first job so this is just my point of view. And also lombok is another dependency that you have to know and maintain.

  • @benfowler1134
    @benfowler1134 10 місяців тому

    I'd argue that Lombok is no more "magical" than Spring Boot's autoconfiguraton magic. OTOH, probably easier, since the generate class source is easy to find and read since it's generated by an annotation processor up front.

  • @calssamyaparm3053
    @calssamyaparm3053 7 місяців тому

    You enter the videos by saying "Es-salamu Alaikum". I am being so happy

  • @AndrewMorales928
    @AndrewMorales928 10 місяців тому

    Just switch to kotlin and still having features of the JVM

  • @dav_kad
    @dav_kad 9 місяців тому

    Generally I'm into Lombok more than against. Those cons were good and pointing crucial areas where You need to pay attention how You use this library. With one statement I won't fully agree which are problems with debugging and testing the code that is generated by Lombok during compilation. The adventage of the Lombok is that You can override each peace of code it generates by Your own explicit implementation whitin POJO/Entity. So in case of more additional logic has to be perform, or simple debuging, in a for (stupid) example: builder() method witin @Buiilder annotation's generated code You can explicity declare this method and perform/validation this logic.

  • @MrTutiplengo
    @MrTutiplengo 10 місяців тому

    While these are all valid points, the idea of Lombok is to reduce boilerplate code. Using IDE tools to generate the same code will result in, well, more boilerplate code, longer code files which can be difficult to read when you have large POJO classes. He says that Lombok requires extra IDE tooling, but if you generate this code using IDE tools, well, you require that extra tooling, too, so the point becomes moot. And if you have all the getter/setter code written manually, you will probably still require IDE tooling to refactor it when you change a property name. IDE tooling is not a bad thing. It is there to simplify tasks, which is the point of developing itself. In the end, using Lombok or not is a trade off that needs to be considered on a per project basis.
    I totally agree with his points on the Equals and Hash Code annotations. For the moment I only use Data, Builder, and the constructor ones (and these last ones sparingly).

  • @leroychiyangwa8320
    @leroychiyangwa8320 9 місяців тому

    you are my GOAT but i think this video you posted for the sake of being active on social media

  • @mahmutc
    @mahmutc 10 місяців тому

    debugging setter is working with lombok and intellij

  • @batta420
    @batta420 10 місяців тому

    Lombok is kind of a standard for my team. No one uses getters and setters these days.

  • @ahmedhathout3298
    @ahmedhathout3298 10 місяців тому

    1- I do not think that Lombok has a steep learning curve at all.
    2- I think it is a dependency very worth adding.
    3- equals and hashcode are dangerous but they are as dangerous if someone implements them manuallly if they do not know much about them.
    4- You can make the Intellij and some other IDEs generate most of the things for you and you may have better flexibility to change them but how many times do you want more flexibility? It is also pretty easy to achieve the same flexibility by implementing what you want manually when needed
    5- Having so much boiler plate code will make it very difficult to tell from the first glance whether this is indeed boiler plate standard implementation (the one that can be auto generated) of the Builder, getters, setters, etc or it is a different implementation because our use case needs that. If you use Lombok and I see that you implemented the setter method for one of the attributes, it will catch my eye immediately. This wont be the case though if you have 10 setters without Lombok
    I have not used Java for 3 years now (kinda) but I think all of what I said is still applicable

  • @alialkhateeb6642
    @alialkhateeb6642 9 місяців тому

    I like and dislike Lombok. One of the things I really appreciate is the object instantiation using @Builder which can limit the use of setting each field and the boilerplate. I know that we can implement the pattern, but it's a lot easier to use annotations for simplification.

  • @dexter9396
    @dexter9396 9 місяців тому

    As a Java dev for 10 years, I use Lombok for POJOs (like DTOs) but never for Entities.

  • @ibrahimshaikh3642
    @ibrahimshaikh3642 5 місяців тому

    good

  • @georgepro8481
    @georgepro8481 10 місяців тому

    I think that we must use Lombok ONLY on the stage of REFACTORING. When everything was completely tested.

  • @khazimndiaye2369
    @khazimndiaye2369 9 місяців тому

    I use lombok when I'm on Technical Approach but when I use DDD on one projet I realy don't need lombok

  • @masimbakachena2721
    @masimbakachena2721 9 місяців тому

    Whilst we are talking about maintaining control of your code, have you seen springboot!!!

  • @abivarghese6555
    @abivarghese6555 9 місяців тому

    Whether agree or not of using Lombok, I feel better to use old school ways to generate the mutator / accessor / constructors.

  • @blpmarques18
    @blpmarques18 7 місяців тому

    Hello, I'm a big fan of Brazil, I wanted to know if you want to use artificial intelligence to translate videos.