Why are Companies Migrating from Java to Go?

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 มิ.ย. 2024
  • Why are Companies Migrating from Java to Go?
    Today we will talk about how Go is where the future is headed even though Java isn't going anything. Enjoy!
    --
    Golang Dojo is all about becoming Golang Ninjas together. You can expect all kinds of Golang tutorials, news, tips & tricks, and my daily struggles as a Golang developer. Make sure to subscribe if you look forward to such content!
    Get Your Golang Cheat Sheet! - golangdojo.com/cheatsheet
    Git repos & notes - golangdojo.com/resources
    Golang Basics - • Golang Basics - Instal...
    Golang Informative - • How much do Golang dev...
    --
    Timestamps
    0:00 Caveat
    1:04 Reason #1
    3:00 Reason #2
    6:10 Reason #3
    7:13 Reason #4
    9:03 Pitfall #1
    10:26 Pitfall #2
    11:06 Conclusion
    --
    #golang #goprogramming #golangdojo
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 136

  • @GolangDojo
    @GolangDojo  ปีที่แล้ว +1

    Get your *FREE Golang Cheat Sheet* -
    golangdojo.com/cheatsheet

  • @gaetano222
    @gaetano222 ปีที่แล้ว +1

    Great stuff, thank you!

  • @akin242002
    @akin242002 ปีที่แล้ว +24

    I appreciate your devotion to Go! Go has been a huge success with American Express and hopefully other major companies come along.

  • @pompiuses
    @pompiuses ปีที่แล้ว +106

    I like Go, but I see too much hate on Java these days. Java is not the bloated beast it was 10 years ago. These days I can boot a web service with a few lines of code. Later versions of the language also lets you write very compact code. With the addition of virtual threads in Java 19 it will also scale the same way Go does. I feel Java gets too much negativity due to cultural baggage, not because it's a bad language or plattform.

    • @johnyepthomi892
      @johnyepthomi892 ปีที่แล้ว +18

      But its tainted by Oracle

    • @ea_naseer
      @ea_naseer ปีที่แล้ว

      @@johnyepthomi892 Go is tainted by Google. Typescript is tainted by Microsoft...

    • @dyto2287
      @dyto2287 ปีที่แล้ว +1

      @@johnyepthomi892 ​ Had people from Oracle visit our company few years ago. They wanted to sell our product on their Oracle Cloud marketplace and also tried to convince us that their Oracle DB is better than Postgres that we were using.🤣We literally laughed at their face.

    • @ruyvieira104
      @ruyvieira104 ปีที่แล้ว +27

      A few lines of code and a couple hundred megabytes of runtime environment

    • @lazyh0rse
      @lazyh0rse ปีที่แล้ว +1

      tfw open the task manager and see how bloated jvm really is, spoiler alert, it's even more bloated than a web browser literally. It's only a personal server? how is it taking so much memory ? because it's java 🤪🤪

  • @kqvanity
    @kqvanity 11 วันที่ผ่านมา +1

    It would be much great if you could accompany some of those points with benchmarks

  • @fruedal
    @fruedal ปีที่แล้ว +14

    Are we going to ignore all that smoke/steam going on in the back?

  • @justinsmith3981
    @justinsmith3981 7 หลายเดือนก่อน +9

    Go doesn't need a dependency injection framework because it doesn't have java beans. You can just use plain old construction injection.

    • @tongobong1
      @tongobong1 4 หลายเดือนก่อน +1

      But old construction injection is hard when you have many objects that depend on many other objects because you must be careful to instantiate the objects in the right order...

    • @fieldmojo5304
      @fieldmojo5304 3 หลายเดือนก่อน +1

      It's not hard, you just type your params and your ide won't let you fail. And that's true for any language.

    • @tongobong1
      @tongobong1 3 หลายเดือนก่อน

      @@fieldmojo5304 you must be very careful to create the right constructor and use just the right one and you must be careful not to send null pointers... With dependency injection framework it is so easy to make sure you always have the right objects ready to serve the client objects and at the right moment.

  • @kidamanecer2144
    @kidamanecer2144 ปีที่แล้ว +43

    gorilla mux just died, please don't recommend it anymore

    • @dyto2287
      @dyto2287 ปีที่แล้ว +6

      True... Time to replace it with chi or some other minimal library.

    • @dandogamer
      @dandogamer ปีที่แล้ว +3

      @@hermes6910 Just no longer being maintained so it's not getting any new features nor security updates

    • @Regnum0nline
      @Regnum0nline ปีที่แล้ว +1

      I like echo

    • @StEvUgnIn
      @StEvUgnIn ปีที่แล้ว +6

      Let’s drink Gin to it 🥃

    • @metaltyphoon
      @metaltyphoon ปีที่แล้ว

      This is the problem with not having a first party support for basic stuff, like websockets. Compare this to ASP(c#) you will never see Microsoft doing this to it.

  • @johnboy14
    @johnboy14 8 หลายเดือนก่อน +5

    Im not sure who hes worked for but every Java project uses Maven in my experience or at most Gradle. There is no proliferation of dependency management tools in the Java ecosystem.

  • @always-ask-why
    @always-ask-why หลายเดือนก่อน

    Tried to get your cheatsheet but your website is down.

  • @TheSiddhaartha
    @TheSiddhaartha ปีที่แล้ว +8

    Can you please suggest some popular and fast Go framework for API development? Also which ORM shall I use? Any sample applications which I can look at? Thanks!

    • @johnsonkengne6229
      @johnsonkengne6229 ปีที่แล้ว +1

      I personally use pocketbase for my startup. But if you are looking for extreme performance and ease of use, you should go for gofiber

    • @banditosdoritos
      @banditosdoritos ปีที่แล้ว +2

      API's don't really require a framework at all, but if you feel inclined to use something, Fiber is good (though it's not compatible with net/http), so is Echo (same incompatibility as Fiber) or Chi for routing. GORM is a nice ORM that comes with a lot of useful methods.

    • @NotMIFood
      @NotMIFood ปีที่แล้ว +9

      The Go standard library has great general purpose library for building web services called "net/http". It is best to learn this first and then look at other frameworks and packages.
      Most other frameworks and packages have a specific focus or purpose. It is best to start with built-in library and then add things depending on what you need/want.
      For example the Fiber framework uses a modified router (fasthttp) to be much faster than the built-in net/http. The tradeof is that it does not implement HTTP2 and uses custom (and smaller) structures for the http requests. So it is faster for small/medium requests but cannot do other things and does not integrate well with other tools because of the custom structs.
      Also be aware that in Go there are not just big frameworks that do everything. Since you can do everything with just the standard net/http, there are a lot of packages that just do 1 specific thing. For example just a router package, or just a middleware package, ... You can always combine multiple packages depending on your needs.
      Once you know the standard net/http you can look at other packages/frameworks. Some interesting ones are:
      - Gin
      - Beego
      - Echo
      - Fiber
      - Chi
      - Buffalo

    • @anxaje
      @anxaje ปีที่แล้ว +1

      @@NotMIFood thank you

    • @CheefCoach
      @CheefCoach 9 หลายเดือนก่อน +2

      I like Gin-gonic.

  • @lubeckable
    @lubeckable ปีที่แล้ว +1

    bro are you still using java in your job?

  • @criticforgood
    @criticforgood ปีที่แล้ว +11

    Thanks. I’m a C dev who’s confused to choose between Go and Java to pivot my career towards web. This video helps.

    • @tshwarelolebeko4223
      @tshwarelolebeko4223 ปีที่แล้ว

      @akashic seer Don't be that angry and come to rust

    • @tshwarelolebeko4223
      @tshwarelolebeko4223 ปีที่แล้ว

      @akashic seer And you have got rust for that, as long as you have rust installed, after compiling what else will you need?

    • @Mustafa-099
      @Mustafa-099 ปีที่แล้ว

      @akashic seer What language should I learn if I am at the start of my career and interested in working as a backend developer? I know C, a little of C++, python and basics of Java and seeing the hype around Go I was thinking to learn it but now I am really confused

    • @Mustafa-099
      @Mustafa-099 ปีที่แล้ว

      @akashic seer I see, I'll do that thank you so much for the insight :)

    • @KManAbout
      @KManAbout ปีที่แล้ว

      ​@akashic seer Because c and cpp are terrible languages.

  • @fischi9129
    @fischi9129 ปีที่แล้ว +7

    NGL, a lot of new tools doesn't sound that appealing. Normally if you want a scalable product, you also want a stable, battletested, product. So having some older but reliable tools sounds better. (Ofc, not 20 years old :) )

  • @nyahhbinghi
    @nyahhbinghi 5 หลายเดือนก่อน +4

    Java is a good language with a bad (outdated) concurrency model. If Java had something like async/await (multiplexed onto a threadpool), I would use it, but the problem is that any library can spawn a thread and nothing can be strictly enforced

    • @lmaoded7505
      @lmaoded7505 29 วันที่ผ่านมา

      Executor framework?

  • @kozas0
    @kozas0 6 หลายเดือนก่อน +2

    Go is full of weird symbols. And it has no structure -I have seen production Go code where they would define an empty object and then have about 2000 lines of receiver methods in that file - but how you know they are all like that? You have to scan every one of them, unlike in Java where you would just need to follow the opening-closing bracket of the class to figure out everything in between is a class' method. Very hard to read language.

    • @kozas0
      @kozas0 6 หลายเดือนก่อน +1

      Plus if I remember correctly it has no final modifier, right? So while I am scanning some code I have to keep track within that function/method for any possible change in that variables, whereas in Java I just label the variables as final and let know the reader he can continue reading without worrying if the variable changes later on.

  • @albtein
    @albtein 6 หลายเดือนก่อน +5

    Go is in the same Java stage in 2010. Probably in the next years, Go will have very popular frameworks, libraries, etc. They'll be industry standard and you'll be forced to learn them. In this moment, Go will be so boring as Java. Java standardization brought a lot of benefits for the development teams, since we don't have to take hard decisions like C or C++. Go is very lightweight and this can help companies to save money in a Cloud environment, since it doesn't require so much computation and a huge runtime.

    • @catto-from-heaven
      @catto-from-heaven 6 หลายเดือนก่อน +2

      It's not about java being boring, but it being a crap. Other even older languages aren't that hated as java because they're not THAT bad.

  • @leonardeuler7988
    @leonardeuler7988 2 หลายเดือนก่อน

    Simplicity and Performance are interested point to migrate to golang.

  • @dandogamer
    @dandogamer ปีที่แล้ว +12

    I've been using go for 4 years and never felt the need to use a dependency injection framework

    • @krige
      @krige ปีที่แล้ว +1

      How do you structure and test your code without dependency injection?

    • @heroChaddi
      @heroChaddi 6 หลายเดือนก่อน +1

      ​@@krigeDI using construction bruh!! Why the hell u need a framework for DI????

    • @bionic_batman
      @bionic_batman 2 หลายเดือนก่อน +1

      true, just manually wire everything together in the main.go
      Imo it is much easier to debug and navigate than placing some magic annotations all over the place

  • @ChristopherVanDerWesthuizen
    @ChristopherVanDerWesthuizen ปีที่แล้ว +7

    Dependency injection: good!
    Dependency injection frameworks: bad!
    Yeah, it's not a bug that Go doesn't have a sanctioned framework.

  • @MrJohnnyImba
    @MrJohnnyImba 5 หลายเดือนก่อน +2

    Prototyping can be extremely fast in Java if you can move comfortably inside Spring or Quarkus ecosystem and if you skip the pattern gabbage. Gradle can be complex but the init command bootstraps your gradle project as quick as go mod init. Java is extremely robust and the invest into the recent java versions is pretty good. Its moving into the right direction, albeit very slow.

  • @EzequielRegaldo
    @EzequielRegaldo ปีที่แล้ว +11

    We migrated to net core

  • @askhat1654
    @askhat1654 6 หลายเดือนก่อน +1

    Java 21, WebFlux, RxJava, Micronaut and etc….

  • @artemsokolov5007
    @artemsokolov5007 7 หลายเดือนก่อน +2

    java compilation is slow? whaaaaaat

  • @laughingvampire7555
    @laughingvampire7555 10 หลายเดือนก่อน +7

    Go is more exciting than Java because is newer, and the ecosystem is starting to form, is just like Java was in the early 2000s

  • @leon_forte
    @leon_forte หลายเดือนก่อน

    I guess version 1.22 fixes the http router issue.

  • @aka_vitfil
    @aka_vitfil ปีที่แล้ว +8

    How many companies migrated from Java to Go?

    • @IvanRandomDude
      @IvanRandomDude ปีที่แล้ว +2

      5

    • @aka_vitfil
      @aka_vitfil ปีที่แล้ว +6

      @@IvanRandomDude Could you provide some proofs, please. And when I say "migrate" it means total refusal to use Java but not use Go only in some new projects. How many companies have replaced Java code with Go code? I don't like Java, I really like Go but I hate click bate titles and messages! The truth is: there are many companies used Go for new projects or modules.

    • @DhavalAhir10
      @DhavalAhir10 ปีที่แล้ว +2

      ​​@@aka_vitfil
      1 - Shiprocket
      2 - Gojek
      3 - ConnectWise
      4 - Swiggy
      5 - Uber (Micro Services)
      6 - Bank Of America

  • @footballfanatics007
    @footballfanatics007 ปีที่แล้ว +4

    What about node js , how is it performing in the industry should i learn it as I have javascript typescript background?

    • @nerminkarapandzic5176
      @nerminkarapandzic5176 ปีที่แล้ว +1

      If one would suggest Java developers to migrate to go then it would certainly be the same for javascript developers. Although javascript/typescript is probably the biggest ecosystem, I don't see companies switching from anything to it in the future. Nodejs has it's place but it can never compete with "real" languges in terms of performance and reliability, Go will beat nodejs in terms of performance by a big margin in almost any case while it still maintains the simplicity that you get with nodejs, and you don't have to deal with all the bs that comes with javascript.

    • @nerminkarapandzic5176
      @nerminkarapandzic5176 ปีที่แล้ว

      that said, if you just want to get a job as quickly as possible and you don't care about anything else, then learn nodejs.

    • @nerminkarapandzic5176
      @nerminkarapandzic5176 ปีที่แล้ว +1

      @@hermes6910 But wouldn't you agree that go is even easier to deploy, you get an executable and execute it, while with node you have to deal with actually having the nodejs installed then pm2 bs, versioning etc...
      I'm actually not a Go dev, but to me Go doesn't seem like a "low-level".
      And my advice was aligned with the narrative of the video. Again, my opinion is that, same as companies are moving from Java backends to Go backends, they will be moving from Javascript backends to Go backends as well. Doesn't mean either Java or Nodejs are now suddenly extinct, in fact they're both bigger than Go currently.

    • @mfc1190
      @mfc1190 ปีที่แล้ว +1

      @@nerminkarapandzic5176 I’m a go dev, and very few entry level devs are hired into go roles. It’s better to start with node as it will be much easier to get a job and experience and then learn go and apply those backend principles.

    • @dagothodros641
      @dagothodros641 ปีที่แล้ว

      ​@@hermes6910 is it a Linux ?

  • @esra_erimez
    @esra_erimez ปีที่แล้ว +8

    Isn't Gorilla Mux abandoned?

  • @booos6823
    @booos6823 ปีที่แล้ว +5

    yea i prefer GO, but in the midst of studying those machine learning and most of the things there using python as framework :|

  • @dragomirivanov7342
    @dragomirivanov7342 7 หลายเดือนก่อน +1

    Dude, something is burning beside you.

  • @argonauts56au1kera6
    @argonauts56au1kera6 ปีที่แล้ว +5

    This and the fact that the owners of Java who is Oracle, and they're a garbage company.

    • @Mooooov0815
      @Mooooov0815 ปีที่แล้ว +8

      But most companies don't even use Oracle Java anymore. Sure, they are still the ones designing the language. But many companies gravitate towards open source Java like with OpenJDK

    • @raianmr2843
      @raianmr2843 ปีที่แล้ว +2

      it's garbage inside out all the way down the very moment you have a corporation calling all the shots.

  • @xtraszone
    @xtraszone 6 หลายเดือนก่อน

    Go will be replaced with Bun in future

  • @GoUkraine777
    @GoUkraine777 11 หลายเดือนก่อน

    halfa year? lol wat what that enterprise java calculator? :D :D :D

  • @jogurtnaturalny
    @jogurtnaturalny ปีที่แล้ว +3

    WTF is this smoke behind your bed?

  • @lazyh0rse
    @lazyh0rse ปีที่แล้ว +3

    You see, when I hear jAvA, I instinctively twitch in disgust out of habit. Now, hold on, before you call me names, I also programmed in Java for over 3 years. If you are using hyping Java because "eVerYbOdy UsE iT". Then I don't care how famous the language, I'm talking about solo development. If you take two projects, one made with Java, the other with Javascript, then you would get 10/1 Time to code. And the Java code is only 50% faster than the Javascript one.

    • @vacc1001
      @vacc1001 ปีที่แล้ว +4

      I mean the IDE itself fills in 90% of the stuff with autocomplete / intellisense. What are you complaining about? I can write C# or Java code in half the time that will blow your Go code out of the water. I can also write Go code in half the time that will blow your C# or Java code out of the water. The problem is your code not the language. Please don't be stupid.

  • @phanvanhoa
    @phanvanhoa ปีที่แล้ว +3

    Big techs have been firing. I hope soon propagate to small tech. Too many parasites in this industry with no better thing to do. To be frank it's a crime again humanity if anyone have the decency and the literary to understand what's going on.

  • @laughingvampire7555
    @laughingvampire7555 10 หลายเดือนก่อน

    In Ruby you can 20x performance by just not using Rails, Rails is just slow as fuck, use a standalone rack app is so much better alternative, Ruby is such a nice language that you don't really need frameworks. Rails has always been a mistake.
    And if you use truffle ruby instead of MRI you are going to get 40x or 50x performance increase.
    By avoiding rails and focusing on building small rack apps with nginx, roda and sequel you can scale horizontally better than with rails alone.
    And if you self-host the predictable traffic of your platform and you only use AWS for the overloads you can save a ton on infrastructure.
    developer time is a lot more expensive than cpu time.
    but I agree, Go is always going to be better than Ruby and Python, because allows to save developer time and also simplifies deployment time because all you deploy is one binary.

    • @feralaca123
      @feralaca123 10 หลายเดือนก่อน +1

      sadly, most ruby jobs are rails jobs.

  • @esra_erimez
    @esra_erimez ปีที่แล้ว +5

    As a backend developer I very much dislike Dependency Injection

    • @dj-yv7oi
      @dj-yv7oi ปีที่แล้ว +5

      Can you tell more about your opinion ? :D

    • @12005914
      @12005914 9 หลายเดือนก่อน

      Ok you win!!!

    • @cssiter8816
      @cssiter8816 8 หลายเดือนก่อน

      Why

    • @md.redwanhossain6288
      @md.redwanhossain6288 หลายเดือนก่อน

      Then I doubt you don't write proper OOP code.

  • @Zeioth
    @Zeioth 10 หลายเดือนก่อน +3

    go is the shit. and it's documentation generator is the shit plus plus.

    • @nyahhbinghi
      @nyahhbinghi 5 หลายเดือนก่อน

      there is no way that documentation generator is useful - like javadocs lol

  • @laughingvampire7555
    @laughingvampire7555 10 หลายเดือนก่อน +1

    because java is garbage that is why the garbage collector pauses so much because is trying to collect the jvm itself 🤣

  • @always-ask-why
    @always-ask-why หลายเดือนก่อน

    Java has only one selling point - it is widely used. There is nothing else good about Java. Java was a big improvement over C++ but now there are MUCH better and more productive languages than Java.

  • @patricksmith8262
    @patricksmith8262 ปีที่แล้ว +2

    I mean, Java sucks. Always has, but it emerged at a time when there were few options to address the issues it was trying to solve. And it had a great marketing campaign behind it.

    • @igorthelight
      @igorthelight ปีที่แล้ว

      True!
      But languages came and go ;-)

  • @laughingvampire7555
    @laughingvampire7555 10 หลายเดือนก่อน

    Go has lots of same things I hate about Java.
    C syntax and dependency on environment variables, object oriented programming, lack of a sound type system that actually saves you from yourself or saves your future self from your past self and from the work of others from the past.

    • @CheefCoach
      @CheefCoach 9 หลายเดือนก่อน +2

      Go is strongly typed procedural language. You don't make much of sense.

    • @catto-from-heaven
      @catto-from-heaven 6 หลายเดือนก่อน

      Go is procedural, not object-oriented. Tf you talking about?

    • @VictimUser
      @VictimUser 5 หลายเดือนก่อน

      Lol

  • @kean8908
    @kean8908 3 หลายเดือนก่อน

    Java and C are the past, Go and Rust are the future.