this post was submitted on 25 Aug 2023
62 points (94.3% liked)

Programming

17558 readers
482 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.

all 50 comments
sorted by: hot top controversial new old
[–] Aux 46 points 1 year ago (2 children)

Java is getting better each year plus Kotlin works in the same eco system and is hyper popular. I don't think that Java will wither any time soon.

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

I really like Kotlin, I would much prefer using it at work instead of Java

[–] Aux 7 points 1 year ago

It sure is! We moved a few years ago and no one regrets.

[–] [email protected] 3 points 1 year ago

Advertising it on work is not an option? Because the technical barrier to change language inside the JVM ecosystem is quite low.

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

Why not use it at work? It’s incredibly easy. You can even replace it a single file at a time.

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

That's not possible for one person to do out of their own personal preferences in a large scale enterprise application.

It would be a project wide migration with tons of people working on it and testing afterwards.

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

That's not possible for one person to do out of their own personal preferences in a large scale enterprise application.

It would be a project wide migration with tons of people working on it and testing afterwards.

I do not know why you think this. You bring it up at an architectural meeting, you begin by explaining the reduction in bugs (there are plenty of studies for this). Then after you get buy in you can literally add the Kotlin library to your pom or build.gradle or buck or whatever system you use and then you can add a single file for Kotlin and it just works. You don’t have to migrate anything, even existing files. I know. I’ve done it multiple times at multiple companies. Migration is incredibly easy if you want to do it, but you can literally just have both side by side with no problems. You wouldn’t need testing for anything except the new code you added. In fact a great way to start with Kotlin is by using it for test files. Then you don’t need to test anything related to the Kotlin code at all!

And yes, I’ve been the “one person” pushing the Kotlin so I do understand the political and technical problems you have to deal with. It really isn’t as difficult as you think.

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

Going to a hybrid would technically be easy it's true, but very few people know Kotlin so no one would write it, not even the ones who know it since others need to be able to read it.

I'm not nearly high enough hierarchically to call a shot like this or be able to continually enforce it. I usually always ask my team leader for his opinion even if I'm simply adding some kind of dependency.

[–] [email protected] 3 points 1 year ago

I really think you’re overstating how difficult Kotlin is to learn. I’ve converted over 30 people to Kotlin, and it doesn’t take more than a few minutes for them to get the gist of it. If you use Lombok it’s even easier. Just say it’s Lombok without all the bytecode manipulation, it’s actually part of the language.

People love using it once they see it. I’ve had one single person go back to using Java after using Kotlin. Do you use anything like groovy, cucumber, aspectj, powermock, etc? If so you have an even greater argument here. It’s much easier to learn Kotlin than to get any new employee up to speed on those tools and frameworks.

Just try. It really sounds like you don’t believe in yourself here. I wasn’t high ranking when I switched my last company over to Kotlin. The language really speaks for itself. There are also plenty of resources giving you ammo for convincing.

[–] [email protected] 14 points 1 year ago

Kotlin is a very easy transition, and it sorts out a ton of issues that you find in Java. Certainly easier than moving to Rust.

[–] [email protected] 36 points 1 year ago* (last edited 1 year ago) (2 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.

[–] theherk 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.

[–] [email protected] 5 points 1 year ago

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

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

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

[–] [email protected] 4 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.

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

I don't see it withering away anytime soon. My entire career has been enterprise web development (which is why I roll my eyes at all the web dev rants). Every company I've worked at has used Java on the backend and some JS framework for the frontend. Java has only been improving in that time and getting much easier to write. I don't see companies taking an (in their view) unnecessary risk that makes it harder for them to hire and lose efficiency, at least in the short to medium term.

I think the only way that changes is if developers are interested enough to try Rust, or any other language, in their free time. If they like it enough, they'll suggest it at work. If enough developers are doing that, it'll slowly shift the local scene.

[–] [email protected] 6 points 1 year ago

For me it has been the same except replace java with c#, I can argue that golang might soon be admitted into the "serious backend language club".

For how much crap people give java and c# they are languages you can get shit done in, fast , efficiently and stable.

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

I’m surprised no one has mentioned golang. We have the usual dichotomy of java and rust but there’s a very very good option for those who are worried about rust adoption.

I vastly prefer writing rust code but go on its own gets you very very similar performance at the cost of developer experience. I think sum types are the #1 requested feature so once that comes I’ll be a much happier boy.

[–] olafurp 4 points 1 year ago (3 children)

I'm on the boat that rust is a bit more cumbersome to write that Java/C#. I work in .Net and I really want to give Kotlin a go now.

I guess I'll just have to wait for MS to add the current trendy feature to C# again for the sum types though lol.

load more comments (3 replies)
[–] [email protected] 1 points 1 year ago (1 children)

I have not done much GoLang development, but I am working on automating some dependency updates for our kubernetes operator. The language may be good, but the ecosystem still feels immature.

Too many key libraries are on version 0.X with an unstable API. Yes, semantic versioning does say that you can have breaking changes in minor (and patch) releases as long as the major version is still 0, but that should be for pre-release libraries, not libraries ment for production use.

[–] [email protected] 1 points 1 year ago

Too many key libraries are on version 0.X with an unstable API

Sounds like my rust experience but then again it'd be non-existing for some of them.

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

I think that India will be a major factor and there are many Java developers. C-level guys don't care about programming languages, they do care about cheap labor. So I don't think that Java is going to wither away anytime soon, at least on a global scale.

[–] exussum 8 points 1 year ago (1 children)

This was said 20 years ago and none of it was true. Outsourcing is big but we don't outsource our highest level jobs. The typical architect role or senior engineer roles

[–] [email protected] 6 points 1 year ago

Unless it's a 10-man startup, a typical company doesn't employ exclusively architects and senior engineers.

By the way, I think it's quite arrogant to think about this in terms of outsourcing and "we". "We" might not outsource everything, but there's a huge market with a lot of potential beyond borders where "we" are located. That's why I explicitly said:

I don’t think that Java is going to wither away anytime soon, at least on a global scale.

[–] [email protected] 1 points 1 year ago

That is a bit dismissive of Java developers around the world. There are several of us still left and we are in key positions of power.

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

I think that .NET will be used more and more instead of Java, because C# is similar to it, but better¹. And there is also F# which is great too². Rust and JS³ might also get some more usage in backend.

¹The only thing missing is union type.

²And has union type :D.

³And that's unfortunate because I don't like JS.

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

It has nothing to do with "being better", it is mostly about a corrupt ecosystem and developers not even realizing what happening.

  • Most non-tech companies use services from consulting companies in order to get their software developed / running. Consulting companies often have large incentives from companies like Microsoft to push their proprietary services. For eg. Microsoft will easily provide all of a consulting companies employees with free Azure services, Office and other discounts if they enter in an exclusivity agreement to sell their tech stack. To make things worse consulting companies live of cheap developers (like interns) and Microsoft and their platform makes things easier for anyone to code and deploy;
  • Microsoft provider a cohesive ecosystem of products that integrate really well with each other and usually don’t require much effort to get things going - open-source however, usually requires custom development and a ton of work to work out the “sharp angles” between multiple solutions that aren’t related and might not be easily compatible with each other;
  • Companies will always prefer to hire more less expensive and less proficient people because that means they’re easier to replace and you’ll pay less taxes;
[–] [email protected] 5 points 1 year ago* (last edited 1 year ago) (1 children)

To make things worse consulting companies live of cheap developers (like interns) and Microsoft and their platform makes things easier for anyone to code and deploy

You're saying this as it is a bad thing when it is not though; better defined APIs and ecosystems that lift cognitive load from you is always a good thing, there is no way to spin that as a negative.

I think dotnet offers an incredibly good ecosystem for development, and I say this as someone that wants to jump ship and change the stack. What pains me the most about the stack is nothing technical. It's not even the past predatory moves of microsoft, but the developer culture that surrounds it. Most dotnet devs I've worked with and talked to seem to be people that simply use visual studio as a window to the rest of the world. They tend to have very poor knowledge about almost everything with barely any fundamentals.

Not sure I follow your point about open source; I think everything we use at work is open source already. Everything is on github and there are quite a lot of discussions in how to steer the language and ecosystem being made in the wide open. It reminds me of the openjdk and python ecosystems. Third party libraries are all open source and have been since almost forever. There is still some closed source culture but not much.

[–] TCB13 3 points 1 year ago

I'm just saying that Microsoft created a self perpetuating (negative?) feedback loop when it comes to software development that essentially takes all the "hard parts" of programming and replaces them with services so anyone with little experience can deliver useful software products. That in turns allows for consulting companies to hire more cheap labor and reinforces the need to by into MS ecosystem that will be developed (improved?) even further in this direction...

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

I don't think many large established companies will be taking the risk on newer languages, but there are plenty of new companies that will mature based on a foundation of writing their backend in Rust or some other new language.

Probably some Rust contingents will form on internal teams within large companies, and they will build new products or services in X new language.

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

Python is already popular so Mojo making that ecosystem much faster, safer and easier to deploy could be game changing when it's fully formed. There are also armies of existing Python developers out there for businesses to tap into and it's an easy language to pick up.

On their roadmap page, it looks like C++ interop is going to be a first class citizen too, further opening up the ecosystem to existing high performance libraries:

Integration to transparently import Clang C/C++ modules. Mojo’s type system and C++’s are pretty compatible, so we should be able to have something pretty nice here. Mojo can leverage Clang to transparently generate a foreign function interface between C/C++ and Mojo, with the ability to directly import functions:

from "math.h" import cos

print(cos(0))
[–] [email protected] 2 points 1 year ago

I also think Mojo will be quite a strong player everywhere

[–] [email protected] 2 points 1 year ago

In my opinion, Python is still missing one key feature: the removal of the Global Interpreter Lock, which is finally starting in Python 3.13.

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

My team is trying to shift away from Java towards a TS backend. Call us stupid but our current Java stack is a nightmare to work with.

Personally I would love for us to do a Go or Rust based backend, but we're basically a startup with a rotating set of employees so I don't see that happening

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

I give typescript running a decent shot of being a major force in backend APIs. There’s a draw to being able to code the same language on front and backend. It’s got a stronger type system than Java in strict mode as well.

It also has quick boot time which can help in cloud functions that may eventually become the preferred method of APIs. No server or os to maintain and they are close to the customers location

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

Yeah, JavaScript/TS doesn't get a great rep being used on the backend. But I use it on quite a few of my projects, one of which gets thousands of requests per minute. I was skeptical of whether or not using Node on the backend would hold up, but the performance has been stellar.. pretty surprising, actually.

[–] olafurp 3 points 1 year ago

I really like TS and Python as a backend language but only for projects that are under 5k lines. As soon as it gets above that refactoring, reference counting and type safety falls off for TS imo.

I'm still a TS fanboy. You can do some crazy type acrobatics in it.

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

Thousands of requests per minute can mean many things so maybe you're referring to several hundred requests per minute, but one of our services at work gets 300 requests/second which is ~18K requests per minute and it's really not that much. We're using pretty cheap cloud services. Even thrice the traffic is pretty much a slow walk for your average production-grade web framework.

Web frameworks are built to support an insane amount of incoming requests, including node. The issue with node is the single threading and having to scale with worker threads AFAIK.

edit: our runtime is C#

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

The issue with node is the single threading and having to scale with worker threads AFAIK

People always say this but its not technically correct and can be misleading.

Technically, JavaScript runs single threaded but not Node.js itself and certainly not when using it on the backend in something like Express. IO operations and other things tooling libraries do can cause you to run out of a thread pool. But Node.js, when handling requests, gives you much of the benefit of multithreading without having to deal with multithreaded code.

[–] [email protected] 4 points 1 year ago

Aaaahh so libuv actually runs a thread pool, TIL. I'm another victim of internet propaganda I guess 😅 . You know, I never actually checked libuv docs until now and they seem quite welt built.

The silliest thing I've just realized is that I knew that the first implementation of a web server in dotnet core was using libuv, and I still didn't think twice about the single threaded meme.

load more comments (2 replies)
[–] MajorHavoc 1 points 1 year ago* (last edited 1 year ago)

In the long run, three players can remain standing:

  • The obvious choice - it's (currently) JavaScript, because some of us will always follow highlander rules. It used to be PHP, when JavaScript wasn't popular yet, at the dawn of time. Before that it was Perl because CGI. Python and Java arguably each had a moment sometime between Perl and JavaScript.
  • Whatever is fastest for high performance - odds favor golang, but I'm just guessing. Could honestly still go to C. Many languages have died before unseating C in high speed contexts.
  • Whatever has the best library support. - In my random opinion, there's currently a run-off between Python and NodeJs to unseat PHP and Java.