this post was submitted on 25 Aug 2023
71 points (94.9% liked)

Programming

17662 readers
223 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 2 years ago
MODERATORS
 

What are your opinions on the future of back-end web development? Is the Java ecosystem going to wither away as more modern and better solutions are emerging and maturing?

If so, which language/framework and/or programming paradigm do you think will become the new dominant player and how soon?

Personally I would love to see Rust becoming a new standard, it's a pleasure to write and has a rapidly growing ecosystem, I don't think it's far away from overtaking Java. The biggest hurdle imo is big corporations taking a pretty big risk by choosing a relatively new language that's harder to learn compared to what has been the standard for decades.

Playing it safe means you minimize surprises and have a very large amount of people that are already experts in the language.

Taking the risk will definitely improve a lot of things given that you find enough people that know or are willing to learn Rust, but it also means that you're trading off Java flaws with Rust flaws. That's the case however with every big change, and Java flaws are a good enough reason to make a big change.

you are viewing a single comment's thread
view the rest of the comments
[–] lysdexic 38 points 1 year ago* (last edited 1 year ago) (3 children)

Java gets a bad reputation from proponents of FOMO/fad-driven development, but the whole Java ecosystem was built for the web. Anyone is hard-pressed to find a better tech stack than Java-based frameworks without resorting to hand waving and passing personal opinions as facts.

I love C# and the whole .NET Core ecosystem, but even I have to admit it's very hard to argue against java.

[–] [email protected] 19 points 1 year ago (3 children)

fad-driven development

This is certainly a way to dismiss all other programming paradigms, I suppose. Also, having used both C# and Java, I can't see myself writing another backend in Java again when C# is such a pleasant language to write in. Both languages have flaws of course, but I find C#'s significantly more tolerable than Java's.

[–] sirdorius 16 points 1 year ago* (last edited 1 year ago) (3 children)

Exactly. The only reason Java is remotely tolerable today is because of influences from those 'fad' languages. Kotlin and Scala were also fads when they came out, they just got adopted because Java was utter shit at the time. Hell, even Java was a fad at some point in time.

[–] [email protected] 6 points 1 year ago (3 children)

I think a strong argument could be made for the JVM as a whole to be honest, since it encompasses several languages. That being said, I'm not sure I've seen a backend written in Kotlin despite how prominent it is for app development.

[–] crazyfuckincoder 11 points 1 year ago

I'm not sure I've seen a backend written in Kotlin despite how prominent it is for app development.

I worked with really Big Bank who have their whole backend written in kotlin. It was such a great thing to witness because usually financial institutions don't give a fuck about clean code and modern programming languages.

[–] [email protected] 5 points 1 year ago (1 children)

I’ve been using ktor in a personal project and it’s been a joy; all the familiarity of Spring but with Kotlin first.

Also, I know that Amazon has started to switch some projects to Kotlin, since they’re such a large Java shop: https://aws.amazon.com/blogs/opensource/adopting-kotlin-at-prime-video-for-higher-developer-satisfaction-and-less-code/

[–] [email protected] 3 points 1 year ago (1 children)

Amazon has been adopting a lot of languages in recent years, including writing services in Rust and C# to my knowledge. It's cool seeing them branch away from Java, although I know that internally they use their own flavor of Java (Corretto).

[–] lysdexic 1 points 1 year ago (2 children)

I can tell you without any shred of doubt that Amazon still standardizes on Java-based frameworks, including Spring, and has absolutely no plans to switch. Each Amazon team is able to pick its own tech stack, but the ones that do not use Java or a JDK-based stack are extremely rare, and more than not are working on specialized applications such as mobile development.

[–] sirdorius 2 points 1 year ago (1 children)

I can also tell you without any shred of doubt, that there are many Amazon teams that absolutely hate Java and would rather build their stack on top of anything else (except PHP, which is rightfully prohibited company wide)

[–] lysdexic 1 points 1 year ago (1 children)

I can also tell you without any shred of doubt, that there are many Amazon teams that absolutely hate Java

Irrelevant. What matters is what the company uses, not what some guy's personal taste.

Amazon standardizes on Java. There is no way around this fact.

[–] sirdorius 1 points 1 year ago

Yes, some "guy's" personal taste matters, because if employees hate it, over time they will stop using it. When you get paged at 4AM because some NPE popped up in prod that could be avoided by any sane language you will think twice on the next stack you build. And since when does popularity equal quality?

[–] [email protected] 2 points 1 year ago (1 children)

It is branching away from Java, even if it still uses it primarily. Unusually, off the top of my head, I happen to know more .NET developers working there than Java developers, and interestingly they develop one of the services on AWS. I know that there are significantly more Java developers, but I don't think we are in disagreement that there are projects that don't use Java.

[–] lysdexic 0 points 1 year ago (1 children)

It is branching away from Java, even if it still uses it primarily.

I'm sorry to tell you, but I assure you it is not. Some small subset of teams uses non-java tech stacks but that's because they have very particular requirements, such as being android apps or running on Linux devices. The bulk of the company heavily standardized on Java and has no plans to ever move away from it.

Unusually, off the top of my head, I happen to know more .NET developers working there than Java developers, and interestingly they develop one of the services on AWS.

First of all AWS is not Amazon.

Secondly, I can tell you for a fact that C# is one of the rarest tech stacks at Amazon. Even Amazon's internal build system does not support it.

I'm afraid you're talking about stuff you know close to nothing about.

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (1 children)

I’m sorry to tell you, but I assure you it is not.

I'm sorry to tell you, but I assure you it is. Like I said, we both agree that Java is the predominant language, but at Amazon there are services written in Java, TypeScript, C#, and Rust to name a few.

First of all AWS is not Amazon.

First of all, AWS stands for "Amazon Web Services". It's not Amazon? Does Amazon not employ people to work on it? Perhaps you're thinking of amazon.com?

Secondly, I can tell you for a fact that C# is one of the rarest tech stacks at Amazon. Even Amazon’s internal build system does not support it.

Amazon's country-named build system supports building many different languages, including C++, Java, Rust, and yes, teams have even managed to make it work for C# projects. It isn't a Java build system, it's a multi-language build system.

I’m afraid you’re talking about stuff you know close to nothing about.

I find it funny how every single comment you post includes a personal attack. Since you seem incapable of backing up your own points with anything but insults, you can be the first person on my block list.

[–] sirdorius 2 points 1 year ago

lysdexic keeps talking about Amazon but has no clue how it works. Take it from someone who recently worked in AWS. You are right in all your points.

[–] snowe 3 points 1 year ago (1 children)

That being said, I'm not sure I've seen a backend written in Kotlin despite how prominent it is for app development.

That’s funny because as a backend Kotlin dev I literally haven’t seen an Android app written in Kotlin (at any of the companies I’ve worked at) but have worked since 2016 with Kotlin on the backend.

Before google announced support for Kotlin the split was massive. Most apps were backend with only a fraction Android. And Kotlin wasn’t even originally built for Android. It only happened to work and then it got popular after someone reported a bug on Android and they fixed it.

[–] [email protected] 1 points 1 year ago (1 children)

It's nice to see that it's in use for backend. I personally haven't seen it, but I always felt like it'd be a good choice for backend development.

[–] snowe 2 points 1 year ago

Yeah it’s great! We compile it into native code and deploy it as lambdas on aws. It’s actually faster than most nodejs lambdas. I love it!

[–] agilob 1 points 1 year ago (1 children)
[–] sirdorius 1 points 1 year ago (1 children)

Apparently I used it at its peak. It was the go to language for big data processing at the time

[–] agilob 2 points 1 year ago* (last edited 1 year ago) (1 children)

We had developers leave my company because they had to work with scala during 2 -> 3 migration. Everybody hates it now

[–] sirdorius 1 points 1 year ago (1 children)

I never used Scala 3 but was under the impression that the migration wasn't as bad as Python 2->3 https://lichess.org/@/thibault/blog/lichess--scala-3/y1sbYzJX

[–] agilob 1 points 1 year ago* (last edited 1 year ago)

This better shows what migration is like https://docs.scala-lang.org/scala3/guides/migration/incompat-syntactic.html

More, new brackets near lambdas, new string formatting, indentiation change. Doesn't look much, but absolute madness when your team is weak in Scala. Only 1 dev had prior scala experience, but whole team had to be involved in migration of breaking changes in scala syntax behavior and... same for gatling. Also changes in syntax. Mid-level dev left the company because of it, we very soon completely got rid of scala and replaced it with TS and Go. Both languages new to the team, but 0 complaints since February.

[–] lysdexic 1 points 1 year ago (1 children)

The only reason Java is remotely tolerable today is because of influences from those ‘fad’ languages.

This might be your personal opinion but it is not a very informed one, or in touch with reality. Java frameworks such as Spring still dominate the backend ecosystem and some FANGs still standardize their backend development around it.

[–] sirdorius 3 points 1 year ago

Read that again. I didn't mention anything about ecosystem, I said Java, aka the language and JVM. You can patch it up all you want with frameworks, it is still a shit language, had an absolutely useless GC up until Java 9 (20 years into its existence). Though it has gotten slightly less shit in the last couple of years. It is informed from years of working with Java 6 onwards. The fact that I don't agree with your opinion doesn't make me less informed.

[–] lysdexic -4 points 1 year ago* (last edited 1 year ago) (1 children)

This is certainly a way to dismiss all other programming paradigms, I suppose.

My comment has nothing to do with paradigms.

In fact, your strawman is proven to be false by the fact that there is no mainstream tech stack for the web which is not object oriented and provides a request pipeline that uses inversion of control for developers to pass their event handlers. They all reimplement the exact same solution and follow the exact same pattern to handle requests.

[–] [email protected] 5 points 1 year ago* (last edited 1 year ago)

Your original comment and this one are exactly what you criticized in your first comment - opinions presented as facts. I encourage you to branch out. You might find that there are other languages and frameworks out there doing cool stuff, and IoC occuring even in the lowest level of languages.

Edit: Since you love facts so much, let's look at some numbers. According to the Stack Overflow 2023 survey:

  • JavaScript, Python, and TypeScript (which is apparently separate from JS here) all are more popular among professional developers than Java. C# and Java are toe-to-toe, with Java only 1.33% ahead (negligible at scale), while JS is more than twice as popular as both languages.
  • Node.js takes the lead for web-based frameworks, with Express being the most popular listed framework that I can see. Both flavors of ASP.NET are more popular than Spring Boot among professional developers, and people have been moving towards .NET Core for years now. Flask is only 2% behind Spring Boot as well, and being a Python-based framework, does not use traditional IoC and instead follows more of a service-locator pattern, where many request-related variables are stored in what is essentially thread-local static state.
  • Although meaningless on its own in my opinion, it's still fun to point out. Java is one of the least admired mainstream languages in the survey, falling at 44.11%. It falls behind C++, C#, JS, Python, and TS. The most admired language falls back to Rust for... I forget how many years in a row, which isn't even an object-oriented language (though borrows some concepts from them).
[–] [email protected] 10 points 1 year ago (1 children)

I can’t describe it. Java is a good language. I just don’t like it, don’t want to write it, am sick of dealing with its build tooling, and have worn thin of all the IDE’s-do-all-the-work-for-me mentality. Good Java programmers are excellent but they are eclipsed by an army of people that haven’t any idea how it works… in my experience.

[–] u_tamtam 5 points 1 year ago

Just use scala or any other decent JVM language then :)

[–] Phoenix 2 points 1 year ago (1 children)

It may be an opinion, but pointing it out won't make me like java any more.

[–] snowe 5 points 1 year ago

Just switch to Kotlin. You get all the benefits of Java with hardly any downsides. Modern language with modern features that is incredibly enjoyable to work with.