I am on a greenfield Java project. A lot of new projects choose it. The maturity of the ecosystem is a major factor in using it. But it also comes down to picking the right tool for the job. Would I use it to write ML / AI stuff? Absolutely not. Would I use it to write back-end services for scalable web applications? Definitely.
Despite what the YT coding bros will have you think, Go, Rust, etc have not taken over the world. C, C++, Java, and C# are still widely used.
Feel free to fight me on it, but I'm kind of post-language? Most of the major languages are so developed now that you can kind of code however you want. You can totally do functional coding as well as OOP in Java.
Java has it all built out, it's stable, it can run anywhere. Most people know Java because (last I checked) it's the most taught in University and has a ton of history, and in big corporations it's typically the default language.
Some of the other languages perhaps are nice because they force you to code a certain way I suppose, and that's good when working with junior coders... although PRs and guides can help with that.
When I choose a language for development, I look at the ecosystem for what I want to be doing (don't be weird, pick something popular), the framework I want to use, the employees we have and what their skill base is... then, after all that... I might think about the actual technical merits of the language itself, but in reality the decision has been made by then, and it's usually Java.
Please don't say you can do functional programming in Java, you just can't. You can apply functional idioms, but the whole Java ecosystem and language is built on and around mutable APIs. Java does not have persistent collections, no way to track side-effects properly, checked exceptions do not work with lambdas and so on.
The most functional parts of Java is the stream API and Records. Bear in mind that I do not consider Kotlin to be a functional language as well. I would put Kotlin and Java as mainly OOP with functional features.
If you want FP on the JVM you have to look at Scala or Clojure.
Ah good to know! All my experience with ML/AI has been purely academic and it always seems to be very geared towards Python. May have to go down this rabbit hole one day!
It also has a very mature runtime environment, multithreads well, and handles huge scale. Node is a lot better than it used to be, but it it is still compared to the JVM a less mature and scalable platform.
Also, a really good SOMETHING developer will be a lot more productive than an average ANYTHING developer; if you want to lean into shorter development time, hire really good people, and let them use the tools they are best at.
Yes, and it seems like OP is already kind of aware of a major advantage of Java when he makes the edit and says by speed he means development time. What about other speeds? Speed of computation is pretty damn important for many applications.
As far as I know, Java is the fastest portable OOP language. As long as this remains the case, Java will have value.
Indeed. Every time I need to build something reliable, resilient, with known tools I choose Java. Verbosity is the only downside, but it has everything you will ever need and probed to death XD
Because software is not about being "sexy" but about being solid...
Each time I have to take something from JS world it's just broken after 3 months because of dependency hell... not to mention lack of compilation type checks (save for TypeScript)
Yes, new systems are build with Java because of the reasons I mentioned.
I.e. you can choose something else new and shiny, but that always comes with risk being on the bleeding edge. Java is "old faithful", it does many jobs really well, and there is very little unknown risk in choosing it.
Yeah my last workplace did a test and it did Kafka queue and web services just as fast as go or dotnet. You’ll never get c++ speeds but Java isn’t aiming for that too
There are 2 types of "speed". The processing speed when running the application and the development speed/time to get something working/maintainable. In the latter area Java shines. And even the first has been improved significantly in the last decade.
You will find, later in your career, that the importance of “development speed” becomes vastly less consequential when compared to “readability”, “maintainability”, “correctness” and “stability”.
I will happily trade off having an initial prototype of something take a few days as opposed to an afternoon of it means that the qualities I mentioned above aren’t sacrificed.
Why build with Java when there are much faster alternatives?
Citation needed. No really, produce benchmarks that prove your point. As far as I can see, java is about as fast as golang and javascript. People reflexively call java slow. That hasn't been the case for most of my 17 year long professional career.
Java also has an absolutely huge ecosystem unlike golang, is statically typed unlike javascript (important for large projects!). I got a chuckle out of the fact that you're saying this from a golang background. As someone who writes in both languages day to day, and really tried to give the language a fair shot before judging it, my time with golang has left me with a feeling that 'the emperor has no clothes'. I feel most of it's popularity is down to the fact that it's a google backed language. I have been continuously frustrated by how clunky and verbose it is (and this is coming from java!)
If you had said 'why java instead of kotlin or even c#', I'd give you more credit. Both are honestly nicer languages to work with. In fact, I would argue the recent improvements in the java language will likely make kotlin better (i.e. green threads and virtual threads) or at least let them utilize a simpler underlying implementation
Finally I'd just like to emphasize, Java is performant as fuck on the back end. The only languages that can really give it a run for it's money are C++ and Rust, and with both of those languages the ease of letting the garbage collector do the work for you is a much better dev experience than using RAII or the rust reference counter. I'd only use those languages if extremely low latency or memory usage is a high concern.
Edit: I see in comments that you meant other languages were better with regard to developer speed. You should edit your post. I think java is probably among the fastest statically typed languages to write, with maybe the exception of Kotlin or C#. I actually think it's easier to write than golang personally. I'm not really considering dynamically typed languages here because while I feel they're probably faster to write, they're worse to maintain, especially on large projects with many devs.
Yeah Kotlin has a leg up on Java in terms of development speed. I think Java may hold a slight edge in readability depending on how disciplined the Kotlin code you are comparing it to. I personally use both but in different contexts, Kotlin for my own greenfield app development and Java where possible for library code to broaden appeal and to not take a dependency on the Kotlin runtime.
The only ecosystem I find can hold a candle to JVM is C#. The rest are all slower to develop on even if they give the illusion of faster setup for the first few weeks they quickly get bogged down in nonsense that you never encounter in JVM or .NET land. I.e tooling hell, terrible libraries, ecosystem fragmentation and drama, etc.
Java has a massive ecosystem of libraries. The GC and JVM are incredibly performant and keep getting better. And the language is continually evolving to get better.
GoLang's performance is in large part because of its virtual threading model. You'll never guess what's recently been added to Java!
The concurrency model in Java is also just very easy to use and understand. Node and GoLang aren't as straightforward, imho.
Java isn't going anywhere. That's why most of AWS is built on it.
I'm leading a big greenfield java initiative on a 5+ billion dollars company. We care more about ease of maintenance than development speed. Java ecosystem is more stable and easier to maintain through years (systems need to be supported for a decade or more) than Node, for example. I've worked on big Node projects for huge companies also. In my experience Java is simply better in this scenario. For small projects or startups that don't even know if they will exist in a few years? Yeah, Node.
Development speed isn't just about writing the code. It's about the full cycle from gathering requirements right though to having an application deployed ready to be monitored and maintained.
Part of what makes Java "fast" for me is the overall ecosystem. I can get through the unit testing part of development quickly because of libraries like Mockito. I can do nice integration testing with Cucumber. Maven handles dependencies easily. My metrics for error reporting will be easy with Spring and Prometheus etc.
I could maybe write the code more quickly in some other language, but if I spend longer trying to hunt down bugs, resolve infrastructure integration issues or wondering why my third party library isnt working then the total development time is slower.
Partially related to the speed of development aspect is how Java is viewed verbose, and I always remember this small snip from this post from years ago:
The big argument against Java is that it’s verbose. Perhaps, but so what? I suppose the real argument is that it takes longer to write the code. I doubt this is very much true after the first 10 minutes. Sure you have to write public static void main, but how much time does that take? Sure you have to write:
Map<String,User> userIdMap = new HashMap<String,User>();
instead of:
userIdMap = {}
but in the bigger scheme of things, is that so long? How many total minutes out of a day is that, two? And in Python the code more realistically looks like this anyway:
# Map from user ID to User object.
userIdMap = {}
(If it doesn’t, then you have bigger problems. Undocumented Python programs are horrendously difficult to maintain.) The problem is that programmers perceive mindless work as painful and time-consuming, but the reality is never so bad.
How fast a single person can write something isn’t as important as how fast a team or group of teams can write something when you’re in an enterprise settings.
Not every language supports that easily.
And when a company already has hundreds of Java devs around and needs to write something new, using Java is a pretty safe bet.
At my current job, we still make new applications using Java.
Really? As they have already said the powerful ecosystem provides a wide set of tools to solve almost any task, sometimes in a couple of lines. Compilation time is faster (I don't ever understand why they compile JS to JS). Runtime is faster. And the most important thing: the code maintenance, by using type safe language nature and structural programming. Also, Java has perfect tooling (IDE) supports for writing code... So I don't understand where is exactly the faster development?
People have asked the same question since about 2005. Java has been pronounced dead for new development so many times I’ve come to suspect it’s 100% powered by pronouncements of its demise.
Not trying to be a dick or anything, it’s a relevant question. But orgs keep writing Java, new and maintenance. It’s fast enough, a shit load of devs know it, and the tooling around the language is solid. There’s a library for everything. You can write pretty low level code, and most often avoid having to. A lot of complaints about the language not having certain features went away a v8+.
I work in a Ruby shop now, but I’d go back to a Java shop any time everything else equal.
Thank you so much and no this didn’t come off negative at all! I was 1 in 2005 so asking questions to a community like this is helping me understand a bit more of the history, and if my post came across as “Java is dying” or whatever I didn’t mean that in the slightest. I appreciate your insight into the topic!
Well, it's a common misconception that Java is a legacy language, that it's slow, outdated, verbose etc. because modern Java is vastly different from Java written in 2003, which is the kind of Java most people have in mind when criticising it.
To your question, I'd ask why you think Java development is "slow". Java has a very mature ecosystem of tooling and the language itself is constantly updated - see https://dev.java
Go is a decent language and I can see why people might use it, but it has a lot of warts, too. Development speed is more of a skill and teamwork issue, although the tech stack does have influence, as well.
The benefits of using something on the JVM (Java, Kotlin, Scala, etc.) are the mature ecosystem and the performance benefits of using a JIT compiler. You don't have to invent everything. To borrow a famous Apple line, "there's a library for that."
Java's main issue IMO is its reputation outside those in the know. Every language has its warts, and Java is no different, but it has solid performance, it's much more popular than people think, and worthy of respect.
Let me propose a scenario here. Lets say a SaaS product which was created in last decade & is in business with a good customer base. Eg Salesforce which has good Java footprint.
Will you consider such a product in maintenance mode? By that definition product when it launches its first GA release goes into maintenance mode as it has to ensure that the current functionality doesn't breaks. But at the same time customers will demand for new features. Now as an engineer does it make sense to write the new feature in Java where you already have infra setup for you or will you choose a new language such as Go? Which choice will lead you to better outcome in majority of the cases?
Why build with Java when there are much faster alternatives?
Because not all businesses are built around extracting last ounce of performance from the application. Majority of them are built around having a stable product with good ecosystem to build on & a wide talent pool to hire from. There is a small subset where the core product is built around extracting the most performance out of products.
Always remember that programming language is a tool. If you are writing code in PHP & delivering business value then you are smart. If you are building your product on the next shiny tooling & using all the cutting edge tech but your product doesn't delivers value to the customer, you are not so smart(Or another synonym of this).
I would suggest you to try it out seriously.. its an awesome language. The tools, frameworks and community support are top notch. The language is evolving at a good pace.
Oftentime, the right language for the job is not the fastest (Developpment Time or runtime) but it is the language your team has the more experience with and has all the infrastructure in place to work with.
Soo teams that have been doing java for 20 years definitly still used java for newer project also.
As a language becomes entrenched, continues to evolve, and has a growing, modern, and mature eco system, and there is a large community and talent pool to perpetuate this cycle, then it’s safe to say that “yes, new projects use that language.” And Java is one of those languages. Just like Go, Rust, NodeJS, Python, C#, etc.
Java is still big at companies like Netflix and Google and I’m sure many more.
Though, I will say that I think in the last 10-15 years other languages have emerged to be similarly popular options, I don’t think Java is going away anytime soon. Probably not until there’s one language to rule them all.
Just want to say: props to OP for asking this question. It seems you have a genuine mindset to learn, and are eager to be educated. Even though you get downvoted into oblivion, you stay curious.
I hope you learned a lot from this post! Keep it up.
I'm working at an AI startup. We use Java for everything including model development (yes you read it right). To answer your question do people use Java for new projects? Yes they just don't brag about it.
Coming to the why Java is still relevant question. Java combines some unique features including but not limited to type safety, performance, plenty of well maintained open source libraries (special thanks to Apache foundation), great ide support, verbose and restrictive enough to help novice developers write better code. With recent features, I would say Java is thriving.
Just learn all the languages and let the job market work it out.
Most dev's will have their language idealism die and then they'll transform into code mercenaries that will work in whatever language the employer wants so long as it pays well.
It's best to be a pragmatist in the workforce not an idealist. Everyone (especially managers) hates working with the idealistic supernerds that won't be flexible about things.
Java is a very solid and mature tool. It gets a bad reputation because so much corporate code comes from cheap Java/Spring contractors that have been recycling the same garbage for 20 years. Modern Java is elegant and efficient in the right hands.
I've used many languages and Golang is actually my least favorite. It's new yet feels every bit as ancient as C. I'd rather use C++, Java, or even Scala. I'll learn Rust if the opportunity comes along.
Go is pretty terrible if we're talking about a dead language. Its concurrency model is... Ugh. Green threads... Java is literally decades ahead of it. Error handling in Go is just about the dumbest thing I ever saw. That language makes absolutely no sense. Rust is an interesting language with some new ideas but Go is just stupid, had it not been for Google it would have been on the garbage heap of history ages ago.
Ignoring the fact that Java is used in a lot of older, existing applications, I see no reason to not use it for new projects as well. It's an awesome language that is continuously updated, and has a good ecosystem.
A major reason why Java is more popular than NodeJS or Go these days is that it's really good for programs that grow a lot and are maintained for many years, i.e. programs that tend to make the core of a business. In other words, Java scales up very well.
Programming in JS or Go is also not faster than in Java, but I agree that they may be easier to get started with, which could make them "faster" for smaller projects, especially by relative beginners. In other words, Java needs to be better at scaling down. We're working on it.
This is super informative thank you!! I didn’t initially take into consideration (or really understand) the true ability of Java’s scaling and use as an enterprise solution, and I do think I was using much of my own limited experience as evidence to the conclusion I was asking about. I’ll be sure to write an API in Java soon just to get a feel for it (as opposed to Node)
It's used quite a lot in the financial industry, particularly back office processing functions.
Mature ecosystem, lots of competing libraries to choose from
Well supported, actively developed and maintained
Fast enough for most needs, particularly the more recent releases
Garbage collected, so generally easier to build long running servers without excessive focus on ensuring correct memory management (bit of an older take when other languages have advanced a lot in this regard, but it explains prevalence in legacy systems).
Frameworks like spring boot make it super easy to start up a reliable API server, already well integrated to a lot of enterprise tooling (identity, auth, logging, metrics, cloud tooling, etc.) via simple properties.
Instead of answering you directly I'm going to point you to a comment I made a few years ago on my impressions of Java after I switched to it from Python for a new job. Long story short, working on a new team in a new language helped me discover that productivity comes from following good practices and using tooling well, not from language choice, especially for any of the very mature/popular languages.
Why continuing to use Java ? There are many many reasons!
First, Java is not slow. That's an idea dating back to the early days of Java, but today the language performs very well. The JVM is powerful, and so is Java. I don't have any good benchmarks under the hand, but I am sure other comments will find plenty of them.
Secondly, the ecosystem is very reach and solid. Whether it's libraries, frameworks, alternative languages (like Kotlin) running on the JVM, you can find everything you need in Java.
Third, the language is usually well structured, typed, and has many features and patterns that help keeping good code quality. That won't compensate the lack of skills a dev may have, but no languages will do so. A lot of code quality tools (integrated to IDEs or not) exist to assist in maintaining great code.
Forth, the tooling / IDE support is one of the best. Compare it to C/C++ which only recently got decent depenency managers, IDEs, code analyzers, ..., Java has always been a good language to work with. Yes, it was verbose, but at least you had help from a good IDE, unlike C++ which is verbose but didn't had great refactoring and analysis tools until the ecosystem renewal started 10 years or so ago.
Finally, you may have the image of Java as an outdated language, but since Java 9, the language evolved drastically to become much more pleasant and modern to work with. Additionally, with the help of Kotlin and other JVM languages, the JVM itself improved and remained totally relevant, ensuring Java also benefited by the progressed brought by these languages.
In my eyes, there has never been a better time to work in Java than now. The past few years has seen a lot of progress in programming languages and their ecosystem which most language benefited from, and Java is no exception to this.
For non-trivial projects, development is not a sprint but a marathon.
If you need to build software that will run for tens of years (banking, insurance, pensions, hedge funds, stock exchanges), the time it takes for the initial development pales to the amount of time you'll have to maintain the software and keep it up-to-date with clients' requirements.
In this case, the advantages offered by Java (type safety, backward compatibility, mature and comprehensive ecosystem, a large pool of available software developers, and tons of training material) will be a safe bet.
And, it's not even necessary that you build the initial prototype faster in NodeJS than you can do it with Spring Boot.
There are lots of FinTech companies that choose Java and the JVM for their platforms. I don't know any finance applications using NodeJS.
Static Typing in a simple syntax. This means both I and the compiler can understand quite a lot about the meaning of some code we're trying to read. For me, that means I'm not confronted with reading a method with 4 parameters none of which I know the type - I know all the types! For the compiler/IDE, it means it can do a lot to assist me. I get so much assistance in terms of refactoring tools, syntax help, code completion, find usage views, etc that I tend to think about my code on a conception level even as I'm writing it, and as I'm telling the IDE my intentions, as opposed to telling me keyboard my understanding of character level syntax rules.
It's very platform independent, so I have worked writing Java on Windows, on Mac, on Linux, deploying to solaris, to linux, even to windows IIS servers way back in the day. I've written desktop apps that easily installed to all three major platforms. I don't sit around these days wondering how to make an app that runs everywhere - I've been able to do that since the late 90s.
It's extremely fast. In the language shootout, you can see that Java is basically a 2nd tier platform in terms of performance. There's C/C++/Fortran (and now Rust) as the first tier. Probably D is there too, not sure. And then in the 2nd tier it's primarily Java and C#, which tend to be about 2x slower than the first tier. Common Lisp and Haskell are hard to judge, sometimes being extremely fast, and sometimes not. After that you get Javascript, which is probably among the fastest of the dynamic languages thanks to Google, but still about 10x slower than Java/C#. And then there's all the rest, like Python tending toward 50x slower than Java/C#.
Ecosystem. It's a mixed bag. On one hand, you've got nearly everything you need somewhere in the Java ecosystem. On the other hand, it's a little polluted by the likes of Spring, Hibernate, J2EE and all that which is heavily influenced by a history of banking and enterprise software needs. It's not nice for the little folks just writing software, and so you need some experience to know that, and have the self-confidence to say no to all that stuff when you don't need it. This is probably the most difficult part for newcomers.
i dont think there is any alternative to java besides c#, which is literally designed to be a java alternative.
imo compared to java, go is like writing assemly. it is not an alternative to java.
node and java are totally totally totally different things. you cant even do multi threading in node. let alone doing anything compute heavy. it is simply not designed for that.
if you want to develop api/backends very fast (in terms of development speed) nothing beats php and php ecosystem. that shit is already built. you just put your logo on it and you are ready to rock. (look at filamentphp for example, nothing like that exists in any programming language). if your goal is to develop and ship things fast (eg. an mvp) both node and java and go does not offer anything close to what php offers.
I’ve been in the market for roughly twenty years. If anything, Java is more popular now than it was back in 2005. The execution speed is top tier, alongside C++ and co. Memory footprint is still a problem but it’s behing worked on and when Valhalla it’s the ground, it will be much less of a problem. Slow startup has been mostly fixed. Developer speed is god tier (any modern toolkit will have a hot reload built-in and a good IDE will write the boring code for you).
Market wise, at the moment, more than 50% of job postings I see in my region are Java or related, with some flavor of the month js ui toolkit on top.
Re memory, Project Lilliput is using clever tricks to reduce the rather large headers of objects. This will help all those classes which aren’t Valhalla value classes (ie all existing ones, though a few will be retrofitted).
Because language itself doesn't mean much. It is everything around it is what matters.Tooling. Developers at hand. Infrastructure. Libraries. I really don't know any faster alternatives in terms of development. Python, JavaScript? They all have problems with multi threading and maintainability in absence of types, and tooling is just garbage compared to java. What you will often see in those "speed of development" examples are a few lines of hello world. They won't show you what a pain it is to maintain mid to large size projects in typeless language with a rudimentary approach to testing.
And yes, new systems are definitely being built. I work in a unicorn startup company, and it's ecosystem is java-only.
Everyone else has said it so I’ll give a version of it too: Java is used a lot in bigger enterprise companies and usually companies that already adopted Java at some point in the past. Every company I’ve worked for used Java for backend work and it’s usually for bigger monolithic projects or smaller micro services. I would assume some companies adopt Java when they want some language that runs in the JVM and is cross platform. Plenty of other languages exist that can do this but Java has been around since the 90s so it has plenty of stable versions to work with. In the past I’ve worked with migration projects from older lower level languages into Java as a migration path, so it’s a language that companies are comfortable with.
So yes new projects are made in Java all the time and probably will continue to be used heavily for a while I’d imagine.
Java is really good tech. The ecosystem is very mature and field tested. It performs well and is easy to develop. And there are tons of Java devs out there. So it's also really cost effective language.
Why build with Java when there are much faster alternatives?
I've never seen software where actual Java is the problem with performance. It's always bad code or architecture. And same thing would happen with any other language. Java is not slow at all.
Java is extremely powerful and I don't know what alternatives you compare it to in terms of development time... It is much much more powerful than nodejs and you can do much much more with it. It is not really meant to compete with Javascript UI's though.
I use Kotlin for personal reasons but it is still JVM and I can still seemlessly use Java code.
I am doing a lot of digital signal processing and usually write c++ processors and python analytic and prototyping code, but naturally, i am a signal processing engineer.
Lately, we started to write a 'managing wrapper' around applications, a service which should run all the time, which we decided to write in Java. Even though, this was the first time since university I wrote java again, the program is simply stable from the first test.
All the Things, that are painfull in c++ and python in large codebases are simply easy in Java.
You tend to write more lines of Code than in Python, but simpler Syntax patterns force you to do more steps inbetween. Type safety forces you to Plan structures ahead.
Garbage collection takes worries about object lifetime or ownership issues from c++ code: some frameworks like qt use a ownership system or raw pointers, which hardly works with smart pointers, otherwise some smart pointer cleans up an object which the framework still uses: as a result, you spend lots of time chasing segfaults and you debug destructors and how you got there. This simply sucks!
Multithreading ist so easy! Each object can be locked simply by synchronized(this), and it automatically works recursively.
My General experience is, i write Java code a little slower than c++ and much slower than in python. But i spend A LOT less time debugging. For large Projects, in my experience, this ist the most time consuming task and thus I do not regret our decision.
Yes, for sure. Personally I switched to Kotlin and it is amazing. Developer experience compared to NodeJS is much better. I have experience about 6 years with JS development (node, react, typescript etc) and I still do not love it as Java or Kotlin.
Try Spring Framework and check some videos from theirs Coffee sessions.
Remember - "Boring tech" is productive way how to do things without inventing the wheel. Yep, it is not in hype, but that's totally fine.
This is meant as sincere feedback since I think this is a great learning opportunity:
When I refer to speed, I mean development time!
It's still a pretty ignorant assumption you're spreading as 'fact' here. Next time you should start with a more open-ended question instead of one that's just completely based on some stuff you read online.
Go isn't faster to develop in than Java. The whole reason the Java ecosystem is so popular is simply that the ecosystem is darn productive. Go and Node don't hold a candle to it in that regard.
It’s easy to hire Java devs and have them working on existing Java code. Now, if I star working with Kotlin then I either have to hire Kotlin people or give Java devs time to get used to Kotlin.
So it’s not faster. And whatever flavour of Java you use, it’s still java so it’s not going to give you performance boosts
A huge amount of enterprise and closed-source software is in Java, and many if not most greenfield enterprise projects are done in Java as well. You can look at any list of most-used languages and they’ll say python and so on, but the actual most used language in the world is Java.
Sigh, maybe you by yourself working for yourself on a small scope are faster but when the projects get big the ecosystem and tools for java are top notch.
Because Java has one of the largest ecosystems for enterprise applications?
I feel like people who ask this question are thinking inside their own bubble lmao. It's been around for years, it works, and it is widely adopted. Companies have applications written in Java, and so they have people who know Java, so they continue to use Java when they "modernize" those services or even create new applications.
it isnt so much that i like in a bubble with these things, but rather I genuinely do not have the experience or knowledge with these things. I can look up statistics and such, sure, but I wanted to go to a source of actual Java programmers and here their unfiltered opinion
I much prefer java backends to NodeJS backends because they are much easier to debug. Javascript is async by default, which results in unhelpful stack traces when something blows up. Typescript type definitions with generics and algebraic types are flexible but tend to get convoluted and hard to read.
Java is fast to code in actually, albeit you shouldn't use it for small things (in which case yeah node's better)
Any big project is great in java since all its nice features & also it has amazing compatibility across platforms.
It's also quite fast compared to other languages, fast to code in and fast to run. Many new programs are made in java; just look at minecraft (e.g. mods and plugins) or many other java programs.
The benefit of college is that you usually don't have realistic constraints to work under that those of us who are employed do. As a result lots of things seem like they're okay when they're really not.
I’m curious, are new systems even being built with Java anymore, like does the language have life outside of necessity of maintaining older software?
Yes.
I understand that much of its edge came from its portability,
That was the first selling point. It achieved that portability by offering the JVM as a platform to target, rather than having to recompile for every operating system. The JVM offers benefits besides portability, such as being highly performant compared to most other garbage-collected languages that use VMs or interpreters.
The other selling points were that it was garbage collected, object-oriented, and not nearly as bad to write as C++.
now that I can containerize a NodeJS server and deploy it just about anywhere, what is the point?
Your question seems to assume that NodeJS provides some kind of unique benefit over Java. I would suggest that the only meaningful benefits of NodeJS ov Java are that it's easier for people who only know Javascript to write something.
TLDR: Why build with Java when there are much faster alternatives?
The only meaningfully faster alternatives are C, C++, and Rust. Two of those were already available when Java was created, and the last one is really trying to replace the first two.
EDIT: When I refer to speed, I mean development time!
That makes even less sense, since Javascript is not known for being particularly easy to write. Unlike, say, Python, whose proponents explicitly advocate trading execution speed for development speed.
Dynamically typed languages aren't faster to write once you start doing anything serious/large because when you call code that's not yours or is old you faff about forever guessing at what the parameters should be and end up having to dig in the source to find out (more faffing) whereas with types the IDE reliably tells you.
And refactoring is a necessary thing.
I'm not just pointing the finger at javascript, groovy is an abomination too.
Spring have a bunch of 'getting started in 15 minute' guides which really do take 15 mins once you have things installed. Other frameworks like Quarkus and Micronaut have even smaller one-page intros.
Typescript is 'not terrible' but those people who love scrapping about lightning fast in javascript will point out it slows them down. I am not aware of any benefits of typescript over java on the back end.
What's wrong with Java? Are you hearing bad stuff about Java on Youtube or certain blogs saying Java is old, verbose, blahblahblah?
Honestly, you'll hear criticism about any language, whether it's Python being slow, C++ being complex, JavaScript having messy syntax, etc, etc, the list goes on. It's seriously annoying and very unhelpful, especially towards beginners who are planning on getting into programming and software development, it gets beginners caught up in something they shouldn't get themselves in, which is language wars.
Programming languages are tools, you use the language that is appropriate for the task. But at the beginning stage, you should really focus on the fundamentals rather than language (fundamentals being: DSA, syntax, variables and functions, data types). Once you get the fundamentals down, you can pretty much learn any language.
Now back to Java. Java is a very stable and time-tested language with a massive ecosystem of tools with tons of opportunities, especially in the corporate world and back-end development. There's nothing fundamentally wrong with the language apart from being a little verbose, but being verbose isn't a big deal and the language itself is scale-able, static typing, convenient libraries, and is kept up-to-date. It's worth learning! Just because Java isn't trendy like some JavaScript framework doesn't mean you shouldn't learn Java.
I like Java and have been developing with it for over 11 years. No idea why people shit on it, honestly don't care. The combo of spring, jpa and a anar frontend works wonderfully
I think you might be right, you can code a lot faster in Golang and JavaScript because one reason is that it is not as typesafe as Java, which comes in handy when you want to try something or build a small application with limited functionality, but as soon as you try to build a big or growing enterprise application it can become a total mess. I saw a lot of big JavaScript (NodeJS, React, …) applications which weren’t maintainable at all and I think that’s were Java shines due to it‘s typesafty and it‘s pretty good refactoring possibilities in most IDEs.
I do NodeJS for prototypes, Kotlin for stable enterprise deploys that don't care much about the server costs and Go for performance/server cost optimized deploys.
Why build with Java when there are much faster alternatives?
NodeJS is not faster than Java, what the hell are you on about? Did you actually benchmark anything or do any sort of investigation?
But to put it briefly:
Modern java versions are quite good. Especially with all the modern frameworks (Spring, Lombok, Gradle, Kotlin, Groovy interop, etc).
It's also very robust and the typing system is much more reliable than JS. It generally builds code that is more predictable, performant and less buggy.
If you want to compare it to js, your main argument should be that it's faster to hack something together.
But Java has a stronger ecosystem and lots of open-source projects. Hell, even just the strong Kafka libraries is a good argument in itself.
It's more efficient for scalable backend services, more energy efficient. The only downside is that it's heavy on memory usage, but it's making strides in certain frameworks there lately too.
The javascript ecosystem is built on mounds and mounds of questionable node packages, which often break and introduce security risks. I think you need to study this a bit more.
If Java is so bad, ask yourself why major tech companies like Amazon and Google have it in widespread usage.
Ok, here is why people choose Java for microservices:
Language is not that important, it is platform and ecosystem that's important. JRE provides very wide and thought-out API for most needs with little quirks. Together with monitoring, debugging, memory dumps and a lot of tuning options. There is no platform like JRE (maybe except for .NET). As for ecosystem, no other platform provide that wide array of battle-tested libraries with that ease to use (hello C++)
Java is stable and compatible. Really. Write once, run and support in production for decades. Enterprises do not like to dump money invested into development so they choose Java.
Java is battle-tested with exceptional level of paid support (from Oracle). When something fails in production it is not an issue to find experts to help with your problem. Another big point for enterprises.
And finally, Java has very good performance, probably the best among GC languages.
Then, why not Java:
Deliver-rewrite-throw out methodology. Namely, startups. Go, python and especially node.js allow getting stuff done much faster. Because performance, compatibility and stability is not important there.
Having 10,000 microservices and not willing to allocate 4GB RAM per each. Java applications are memory hungry since all the features of Java platform and ecosystem take its toll on memory. That's where Go and especially Rust shines.
low-end projects. May be controversial but I believe team of inexperienced devs will be more productive in node/python/go than in Java.
I tend to gravitate to Java when I can due to how mature it is and how well dependencies are managed. I use nodejs to run smaller more compact stuff, mostly AWS lambdas but when it comes to complex operation I still go with Java.
Kotlin > Java still jvm I know but I realy have to say kotlin is so nice but old big corpo change in speed of a snail on sleeping pills.... so I work 99% with java
Java is just as fast to develop with as any other language (if not faster than most) speed doesn't come from a shirt sontax but mostly from tooling and ecosystem, Java have one of the best (or maybe even the best) mature ecosystem out there to build pretty much anything to an enterprise level. Starting and developing complex applications is a trivial task using frameworks such as Spring or Quarkus that have built-in libraries that do 99% of the heavy lifting and all you must do is glue the stuff together.
Java is a language that kinda forces you to be very organized in your code, so writing a clusterfuck unmaintainable mess though is possible, is not as hard to avoid as in other languages such as JavaScript where you cannot even control the input and the output of functions of type safety of any kind without writing a plethora of sanitation checks ( "===" operator)
Java is one the 3 most used languages, so it's easy to find Java developers.
it's an easy language to learn, with a not that complex specification compared to other languages such as c++ and C#, which have almost twice the amount of keywords for example.
it's constantly evolving, Java releases a new version each 6 month, with many augmentations and new features each release.
And yes, in my company we use a lot of Java for new developments, currently we are developing some applications in java 21 and gonna migrate some older stuff from Java 11 to 21, starting next month.
gonna migrate some older stuff from Java 11 to 21, starting next month.
Java 11 to 21 should be trivial. Probably won't even need to make any changes at all. Unless you are integrating with native libraries or something exotic like that.
Tbh, in my experience, new developers always seek the new stuff, thinking they're on the cusp of this great new technology.
These languages always seem nice in trivial examples or smaller codebases.
Then everyone realizes the libraries and frameworks aren't there, and so these new folks start building them. Years go by and they reinvent things java, c#, and c++ has had for years, except worse.
Then they wake up and realize they've spent years solving problems that have already been solved.
Languages haven't really innovated in decades. The best part of golang is it builds to a static binary. Their VM isn't better than the JVM. Channels are really overrated and barely reduce the work with threads. They toute not being OOP but every code base has constructor functions and receiver functions - just methods with extra syntax.
All these other languages compile to LLVM or the JVM, so they're essentially the same as everything else except with restrictions.
Rust is at least doing something kinda interesting.
Node/JS is a disaster. Typescript is saving their ass because it's from the makers of C#.
All languages eventually become Java - and I hate java. Programming sucks. Languages suck. Frameworks suck.
People use Java because nearly everything is solved already. You go to work, write some code, go home and hang out with your family. It just works. Same with C# and kotlin.
Most other languages feel like going to war at work. With Java you learn the old ways and things just flow. Tons of jobs, they make more, and they work less. It's a solid middle ground.
What a thread! Ill just throw in my two cents. Personally, I like java because it can run on any OS and has a structure that is organized in a way that my brain likes. Other languages like JavaScript and python are too unstructured for building organized code for my larger projects and languages like C++ or Rust are overly complicated for most of my small projects. Java sits in a sweet spot of codability for me. Plus if I really need to use those other languages (for a job or something) Java is similar enough to everything else that I can easily transition.
yes java is thriving and improving and is imo one of the best languages out there and I dont see a real competetor for the JVM. kotlin seemed to become somewhat relevant but stayed in android and jetbrains context.
Yes lots of new work is done in Java. There are also lots of Java devs, so it makes sense from a hiring perspective as well as you can easily hire the skills you need. Doing that with some niche language might be seen as more risky from a business perspective. If someone leaves and you cant hire a replacement it might have a very negative effect on the business.
Find an ecosystem you like using and just use it, all of them have massive ecosystems. You can pick more languages up as you go along and don't worry about the speed or performance they're largely irrelevant metrics.
Java is massive in big enterprise, it and the JVM are extremely fast, safe, mature and there are multiple implementations for just about everything you could ever want already out there. Development, maintenance, build and deployment tooling is also extremely mature as it has been around for decades and all the typical problems with developer efficiency have already been solved.
A short answer is: yes, because there is a shortage in at least mildly skilled developers, but there is no real shortage on java developers So corporate will keep making java applications, people will learn java because work is available, corporate will stay with java because workforce is available
As someone who works with Java at a financial institution, I think the biggest thing it has going for it is maturity. Java has incredibly mature tooling and packages of any language I've worked with. I'd love to hear what other people think, or if they disagree with me.
Moving quickly to my 3rd decade with Java; I primarily work on a highly scalable streaming media server and we wouldn't chose anything else as our base (there's C/C++ in there too, of course). New projects here also target Java, but the best implementation for the given ecosystem is always a deciding factor.
For me java is very fast to develop backend and micro apps.
I can just create a microservice connect it to the network just in cokuple hours. It will be safe and bug free because I know the packages I use are almost perfect(not100%).
I have done a small machine program that runs under very small resources very easily under a day and we shipped the code tested on field adjusted on field very easily the product was ready in 1 week.
Unlike what people claim it to be. It is extremely fast to develop java apps.
I am not even talking about how fast it works if you tweak it. Specially my friend works in finance and they either have to develop cpp or Java.
Well I use other languages as well but this has nothing to do with other langs so I will not say much about them.
We also develop all new projects on java/kotlin(depends on the person) as a startup. Why it's extremely fast to roll out updates and release. We just click install script and everything is uploaded after build. Then we only need to change docker config or put it in the server etc.
We had so much trouble with js environments that we had been working on frontend for a month which we developed a backend for it in 2 days. Js just never works as expected.
I love programming to interfaces. In Java it is very easy by using OOP concepts like Inheritance and polymorphism to implement great design patterns which goes a long way in improving the maintainability and extensibility of the code. GoLang's composition is not quite the same thing.
Java has been around for ages, and is unlikely to disappear.
So you can reasonably expect it to be maintained for the next couple of decades and for developers to be available for hire. And that matters a lot more than development maybe being slightly faster in a younger language.
For many, the alternative to Java is not golang but c#.
Java is a great language and mature eco system and is supported by all the big SAST ans IAST tools. Easy to govern in large organizations. Sure there are definitely spaces golang or c++ might outperform - but the instances where that is really required are few and far between. For 99.99% of projects out there java is fine.
Java is a lot more mature, it has had generics for years when Go only introduced them last year or so. There are so many libraries as well.
It also takes time to become as proficient in another language. The workforce would become a bottleneck if all new projects were written in Rust.
I think you also become attached to a particular language, especially when it's your first, but hopefully it doesn't prevent you from learning others too.
Your Edit indicates you think it's faster to develop in NodeJS than Java. Is that objectively true? I don't know, because I don't know about NodeJS.
Assuming it is, my gut feeling based on long experience with Java's tradeoffs tells me that a 500,000 line multi-year project written in NodeJS by a team of developers of different skill levels might well be much harder to maintain than the Java equivalent. Besides Java's top-tier ecosystem of available libraries and tools, it's hard to find a tool more amenable to writing maintainable code. It's another major reason people still use Java.
A company that's going to invest several million dollars in a code base that's going to be the backbone of its business might well value maintainability over development speed.
Try something like Quarkus for micro service development and you'll see it's one of the best dev experiences with so much capabilities available to you
Modern java is much better than java 8. Plus the ecosystem of maven packages and plugins is huge
I've started some java projects recently and I am just so comfortable writing class after class, test after test. Don't get me wrong I'm not a TDD fanatic.
Java excel at the the most problematic parts of programming that people tend to ignore.
When planned and designed well, it is very easy to scale.
It has so many libraries that has classes already written that you might need.
So many design patterns and best practices, when implemented correctly it will make your application transparent and easy to extend.
Awesome testing tools.
-When structured correctly, almost any dev can navigate your project with ease.
So many 3rd party tools that can be seamlessly integrated with your java app.
Huge community
Type safety and the ability to drop the explicit type safety and replace it with unit tests.
There is only one huge bottleneck that comes with enjoying the other benefits, dependency management. That will be the most important and the most difficult part.
While smaller projects could benefit from the simplicity of not type safe languages, extending their codebase surely will lead to spagetti code after a while.
Java is a versatile language and hard to master, but worth the effort in the long run.
Despite all the grudgers and enviers, Java hasn't just held its ground against other languages, it still trying to get ahead of them. And it is tightly bound to the evolution of the JVM, which is used by many other languages, namely Kotlin which is frequently cited as a competitor. Another one is Grovy. There are libraries that allow to run Python, Ruby and Prolog on JVMs.
Currently, there are scheduled updates of the Language Spec and libaries every 6 months. With changes disscussed in the Java Community Process (JCP) That is faster and more frequent than in most other Languages. There are JVMs available for many environments, plattforms, and operating systems.
Java runs on all recent x86, amd64, arm64 plattforms on Linux, most Unixes, Windows & MacOS, as well as on huge IBM Mainframes in OS/Z, but also embeded as language for database triggers in Oracle and IBM DB2 Databases, and used as menue scripting language for Blueray players and settop boxes.
Recent improvements are geared to make paralleization and multithreading easier, safer and faster. They are also building a library that is geared at low level parallelization utilizing vectorized assembly statements available on graphic cards or other specialized coprocessors, in order to make this accessible to Java.
With respect to development time, I don't think, Java has any problem with its speed, although there had be some efforts to get a bit closer to script like development cycles with a repl-like approach.
Development speed is always a complex interplay of the developers thoughts & habits, and the task at hand. I had frequently to hop between languages, and I never found any one language, that was 'faster' in development, when it comes to problems that are a bit more complex than shoving a string into a file, and sending that file into socket.
The gruntlers gruntling about excess semicolns, or some minor library defficienies, or missing features, or being obstructed by the strong type system are just gruntlers: we should be beyond the point of complaining about 'too many keystrokes'. And if features are really lacking, rest assured: what the JCP isn't going to deliver any time soon, you won't require anyway.
Some grudgers state: Java is the COBOL of the present. Well, COBOL was developed and gained traction in the 60ies. When I started in my first Employment in the 90ies, most companies with a mainframe still were 80 % COBOL shops, and they kept and maintained this code right into the 2010s. Therefore I trust, that we'll see Java development for the next 20 years at least.
I'm not a huge java fan personally, but the concepts it teaches you are super important. It's also used in TONS of stuff, for one example the Spring web framework powers a whole lot of web infrastructure in my state. This language isn't going anywhere
For me. Dependency management, libraries for damn near everything, easy multi threading support, Data streaming APIs. I don’t have to get caught up in explicit memory management but I have access to do so if I want vs having to verbatim.
A few reasons I dislike Java: 1) cold start times, 2) inability to compile to a single native binary without things like GraalVM, 3) the amount of stutter that even C# fixed with the `var` keyword.
Python has to enforce standards typically by naming convention and relies upon good practices by each developer. While not perfect, Java ensures that no one programmer wrecks a software ecosystem. You have to develop in a way that all but ensures you will have a usable and maintainable code base.
Scalability, JVM, even tho I’m not a huge fan of Java, I certainly can see a specific need for it. My list of complaints are long but in the end, it performs and harder to push breaking changes.
When you say development time, i beleive you're only speaking about initial development and not maintenance. My opinion is, maintenance is easier in verbose typed languages
EDIT: When I refer to speed, I mean development time!
Why do you think Java has slower development time?
If you think it's the famous verbosity, then no, it's handled just fine by having an IDE that understands the language and can write things for you. Plus modern language features (lambdas, records...) reduced that too.
If you mean how you can quickly make a web endpoint, Spring solved that years ago. Moreover, any boilerplate dwarfs in comparison with the actual business logic you have to write to do the actual stuff.
Or do you mean some other aspect of Java being slower? If so, which?
Don't get me wrong, I bet a language/environment (Go, NodeJS) specifically designed with a built-in web server for web app development can reduce the time from zero to your very first endpoint.
Java was not, and indeed lacked in that area in the JavaEE days. But now, Spring and Spring Boot give us pretty much the same experience, perhaps with a "few" more megabytes to set things up. But we're talking minutes at the beginning of the project, that is really not significant in the grand scheme of things.
After that, the fastest-to-develop language is mostly the one you're most familiar with.
The completeness of the ecosystem is the short answer.
I code in multiple languages(Java, Kotlin, Golang, C, Python), and my ability to find a library or a tool to make my work go faster is unparalleled.
Java may be dwindling, but it's still one of the easiest languages to build a complex system. Need an obscure library to validate HL7 FHIR? Good luck finding anything for Go or NodeJS.
Depends, I actually did get much of the desired response. By doing it the way I did, I was able to have the fallacy-based thoughts exposed to myself and was able to correct them with newfound understanding!
Faster development time? You mean for Hello world?
I'm not sure if you did Java development with Spring Boot, Lombok, Spring Data, JPA, and REST with swagger tools, to name a few. I can hit the ground running in just a few days, even setting up a prod ready microservice and more.
Initial speed with other languages, maybe yes. In the long run, Java is a much better choice, not to mention the mature ecosystem, etc...
You being a teenager asking why people use java when they can easily deploy a nodejs service is perfectly fine. The problem is that some professionals do the same.
That actually puts it in an outstanding perspective! I think the draw of how much easier (with no experience) you can get a Node app up for basic things led to much of my conclusions regarding its use. I appreciate you!
Why do so many ask this like it’s bad. I’m a .NET developer right now but I loved using Java in a few classes back in school. Why would you use it? Good language features and ecosystem
I would say in the enterprise world, depending on the task, but development time can be as little as 20% of the effort. You need to gather requirements, design, develop, test (quite often multiple types of tests), document. You also might have an unnecessary amount of meetings, code reviews, stand-ups, emails and so on.
Of course what I described above varies from company to company, but it can give you an idea that in many of them, reducing development cost is not such a big saving.
From a more technical POV, I consider that java, besides its wide ecosystem and community, excels in maintainability. I am not that much familiar with other languages, but having migrated some large projects across different versions of java (plus some other big refactors), I value having a language that compiles (rather than just be interpreted). Of course you end up relying on tests to verify behavior, but getting the "compile" errors in advance can save time and make things easier.
As a java professional: There is a lot of demand for it. It is mature There is a lot of support online It is well known It is actively developed It has a huge ecosystem
Java and all derivatives are the most resilient and reliable tools that are out there on the market. The rest is just hunk of junk that breaks the moment you stop looking at it. That’s what corporate environment and my own development has taught me. It is built to last.
Well, there's the heuristic argument. Many capable developers and shops choose it, especially for greenfield development, so assuming you buy into aggregated expertise you could easily make the argument that all else being equal it's the most effective language for the tasks its being used for.
As for Golang (or any other language that is often used for backend development) I think people get muddy about the facts and pros/cons when evaluating languages for their projects. I've been developing in Java (~20 years), Python (~25 years) and Golang (~early adopter) professionally and I can tell you that in my experience Java is the fastest way to develop production code at time of writing, by a healthy margin (caveats apply if your workloads are in specific domains more suited to Golang or Python but those are rare).
Let me phrase it this way; I'd happily bet half my life earnings on Golang expiring well before Java and Python do in popularity, adoption, job availability and codebase count. If you find yourself thinking your Golang projects complete much faster than either Java or Python then more likely than not you're comparing apples and oranges. You only spend single digit percentages of time coding fresh code on average so once you factor in security, performance, maintainability, testability, refactorability etc. I struggle to think of any production code producing pipeline where Golang would win out (again, specific domains such as devops, CLIs etc excepted)
From what I have heard, mostly because a lot of legacy codebases that are still in use are written in Java, and it works.
Also it is kind of easy to learn but not as high level as something like python, so a lot of people end up learning it as beginners. That is why I use it.
I've worked on enterprise applications using Go, Java Spring, NodeJS, and Django. Java Spring by far is the easiest to develop in, test, maintain, and deploy. Like others have mentioned, the ecosystem is unmatched.
4g languages had much shorter development time. If this was the most important metric then those would have won decades ago. But.. they weren't general purpose which is apparently important as well.
Many enterprise orgs asses the quality of their IT by iso 25010, with portability being one of the metrics. You probably haven't experienced the pain yet when an org has to rewrite from scratch because the were caught in a vendor lock-in and couldn't just port to another platform. Being platform independent is important. Since no other general purpose compiled lang takes this metric as far as java, expect to see Java in future systems...
I’m curious, are new systems even being built with Java anymore, like does the language have life outside of necessity of maintaining older software?
Yes. It has had advanced features like "GENERICS" that Go only just got for a long time. Oh, you think that was outdated and below the belt? That's fine, because it is. Just like... what you wrote.
Why build with Java when there are much faster alternatives?
I mean, speed is one reason. I don't mean just execution speed, but things like "I want to bulk insert 50k rows and I would prefer if I could do it in very little time on Oracle Free, so my tests run faster". That's very simple in Java, it's not as simple in Go. Just check this stack overflow post. The sort of simple Enterprise thing that we all do all the time.
You have to consider the possibility that for the sort of tasks Java gets used for a lot, it's actually pretty comfortable to use. If you want more dynamic Java, here's a fun little challenge. Build a class that has a DataSource, takes a query string and returns a Map<String, Object>. Should be laughably easy. Do the same in Go, TS, or other language and ask yourself why Java is supposed to be harder. It really isn't.
Java is wildly used in the financial industry. From banks to hedge funds, it's common for new projects to be Java based. You'll also see a lot of Java containerized. While Java historical selling point was "write once, run everywhere", the Java Virtual Machine is such an incredible piece of software that you'll get almost C like performance with a lot less surface error.
It will also be easier to integrate into existing APIs.
Regarding development time, Java is a pretty fast language to develop in.
Being verbose is pretty irrelevant, any IDE that's worth the name will autofill it. Development time really starts when you've grown from writing simple and isolated methods to support the changes that come into a full platform that experiences the change of time. And Java's pretty good on that scenario. You can obviously shoot yourself in the foot in a multitude of ways, but Java sets you on a pretty good path.
I'm late to the party, but… define "development time". Time spent getting POC up? Time spent to operationalize full production quality code? Time spent on maintenance after primary development?
I haven't seen this take yet: One of the reasons people use Java is the halo effect. Big corporations use it, so developers learn it. Since they know it, they use it else where. This leads to the question, why do big corporations use it?
Oracle Support.
If a national bank has a problem with NodeJS, they're SOL and have to fix it on their own. No one "owns" Node and therefore no one can be accountable for it. If said bank has a problem with Java, they call their Oracle Support Rep and an engineer is on the line with their developers fixing the problem.
If there's a problem that can't be worked around in NodeJS development time is effectively infinite as a fix in indeterminate. If there's a problem in the JVM development time is effectively infinitely faster since Oracle is on the hook for it.
I agree with a lot of commenters on here. For up front reference, I do not like Java, I am a C# fan boy, but that is really not the point. I run a software development company and it is about being able to get software completed and out there that is robust and works to the client's needs. Java, and C# as well, have been around for a long time and both have very mature environments and are very well supported. I am not necessarily saying other languages aren't but the length of service is huge. Having said that, a lot of the reason behind choosing a language is based upon the human resources available. If I have 10 Java devs from the previous project, why would I choose anything else, that would just be stupid. It's one of the partial reasons decent languages stay around for so long because staff know the language and as a business owner I probably don't want to train my staff to use another language when the current one they know works perfectly well.
Let's be honest. Java is a great language, but it is painful to read. If Kotlin was just java with a Python-like or a Golang-like syntax, it would have literally killed Java for good.
TLDR: Why build with Java when there are much faster alternatives?
That's what the devs 1 generation ago at my job wondered about why they should switch away from Cobol. Now that the recrutment utterly failed, they wonder if they should try that fancy Java 8 thing before the last ones go to retirement...
Who cares if a software is fast, if nobody knowing the language is available?
If you write enterpise level application, speed it's not always main factor when you choose language. Other are stability of language, scalability of your application, support to envirovment and infrastructure etc. When you write this kind of application, you don't want change it again in next year or two when something has change within language. And now my personal opinion. Node.js as backend is a bad choice, syntax of js it's not friendly. But it's only my opinion.
Java is relatively cumbersome, and the code is more verbose to write, but the code written by senior Java experts and novices is similar, and it is not easy to have various novel writing methods. For complex projects and large-scale team projects, it is still very convenient to maintain and iterate. If it is an individual or a small team of several people, you can use anything, and the development speed is the priority. However, if the scale is large, this stable programming language is still suitable. The system is also more secure, easier to maintain and easier to take over.
Java is very fast, often faster than python or other interpreted code and runs on many systems without installing. I am using it for Linux and Windows in same manor... UI is not the best and starting after loading long. But then it works fine and fast. In many operations not far away from C.
And syntax is very similar to common C that makes it easy to comei n..
The selling point of Java in it's glory days was the the developers could write the code on standard Windows desktops but it could be deployed on powerful Sun servers. You're correct in saying that much has changed since those days.
522
u/webguy1979 Jun 10 '24
I am on a greenfield Java project. A lot of new projects choose it. The maturity of the ecosystem is a major factor in using it. But it also comes down to picking the right tool for the job. Would I use it to write ML / AI stuff? Absolutely not. Would I use it to write back-end services for scalable web applications? Definitely.
Despite what the YT coding bros will have you think, Go, Rust, etc have not taken over the world. C, C++, Java, and C# are still widely used.
746
u/HaMMeReD Jun 10 '24
Building software takes skills, java skills are common, thus Java is common.
Java also has an incredibly mature ecosystem (i.e. maven packages) and ways to utilize the ecosystem in more modern ways (i.e. Kotlin).
77
u/onebit Jun 10 '24 edited Jun 10 '24
Speed doesn't matter a lot of the time. Ecosystem is more important.
Personally I dislike the javascript ecosystem. It's too complicated, especially when typescript is involved.
That being said, I think Java is fairly fast these days. At least it beat Go and NodeJS.
https://medium.com/deno-the-complete-reference/node-js-vs-java-how-faster-is-bytecode-compared-to-interpreted-code-for-jwt-sign-verify-910caa55a7f2
https://github.com/kostya/benchmarks
167
u/0xFatWhiteMan Jun 10 '24
Java is just as fast as anything else. Look up disruptor, and/or billion row challenge for good examples
196
u/alpacaMyToothbrush Jun 10 '24 edited Jun 10 '24
Citation needed. No really, produce benchmarks that prove your point. As far as I can see, java is about as fast as golang and javascript. People reflexively call java slow. That hasn't been the case for most of my 17 year long professional career.
Java also has an absolutely huge ecosystem unlike golang, is statically typed unlike javascript (important for large projects!). I got a chuckle out of the fact that you're saying this from a golang background. As someone who writes in both languages day to day, and really tried to give the language a fair shot before judging it, my time with golang has left me with a feeling that 'the emperor has no clothes'. I feel most of it's popularity is down to the fact that it's a google backed language. I have been continuously frustrated by how clunky and verbose it is (and this is coming from java!)
If you had said 'why java instead of kotlin or even c#', I'd give you more credit. Both are honestly nicer languages to work with. In fact, I would argue the recent improvements in the java language will likely make kotlin better (i.e. green threads and virtual threads) or at least let them utilize a simpler underlying implementation
Finally I'd just like to emphasize, Java is performant as fuck on the back end. The only languages that can really give it a run for it's money are C++ and Rust, and with both of those languages the ease of letting the garbage collector do the work for you is a much better dev experience than using RAII or the rust reference counter. I'd only use those languages if extremely low latency or memory usage is a high concern.
Edit: I see in comments that you meant other languages were better with regard to developer speed. You should edit your post. I think java is probably among the fastest statically typed languages to write, with maybe the exception of Kotlin or C#. I actually think it's easier to write than golang personally. I'm not really considering dynamically typed languages here because while I feel they're probably faster to write, they're worse to maintain, especially on large projects with many devs.
124
u/ArtisticPollution448 Jun 10 '24
Java has a massive ecosystem of libraries. The GC and JVM are incredibly performant and keep getting better. And the language is continually evolving to get better.
GoLang's performance is in large part because of its virtual threading model. You'll never guess what's recently been added to Java!
The concurrency model in Java is also just very easy to use and understand. Node and GoLang aren't as straightforward, imho.
Java isn't going anywhere. That's why most of AWS is built on it.
56
u/RICHUNCLEPENNYBAGS Jun 10 '24
Many more new systems are being built every day with Java than with Golang.
167
u/preperstion Jun 10 '24
Because the people that sign my checks have a shit ton of Java I need to maintain and add to
137
u/vips7L Jun 10 '24
Do you really think Go or Node are faster? This is bait right?
26
u/marmot1101 Jun 10 '24
People have asked the same question since about 2005. Java has been pronounced dead for new development so many times I’ve come to suspect it’s 100% powered by pronouncements of its demise.
Not trying to be a dick or anything, it’s a relevant question. But orgs keep writing Java, new and maintenance. It’s fast enough, a shit load of devs know it, and the tooling around the language is solid. There’s a library for everything. You can write pretty low level code, and most often avoid having to. A lot of complaints about the language not having certain features went away a v8+.
I work in a Ruby shop now, but I’d go back to a Java shop any time everything else equal.
21
u/n0d3N1AL Jun 10 '24
Anyone that asks this question hasn't used or even seen Java for over a decade.
19
u/darkwyrm42 Jun 10 '24
Go is a decent language and I can see why people might use it, but it has a lot of warts, too. Development speed is more of a skill and teamwork issue, although the tech stack does have influence, as well.
The benefits of using something on the JVM (Java, Kotlin, Scala, etc.) are the mature ecosystem and the performance benefits of using a JIT compiler. You don't have to invent everything. To borrow a famous Apple line, "there's a library for that."
Java's main issue IMO is its reputation outside those in the know. Every language has its warts, and Java is no different, but it has solid performance, it's much more popular than people think, and worthy of respect.
11
u/varunu28 Jun 10 '24
Let me propose a scenario here. Lets say a SaaS product which was created in last decade & is in business with a good customer base. Eg Salesforce which has good Java footprint.
Will you consider such a product in maintenance mode? By that definition product when it launches its first GA release goes into maintenance mode as it has to ensure that the current functionality doesn't breaks. But at the same time customers will demand for new features. Now as an engineer does it make sense to write the new feature in Java where you already have infra setup for you or will you choose a new language such as Go? Which choice will lead you to better outcome in majority of the cases?
Why build with Java when there are much faster alternatives?
Because not all businesses are built around extracting last ounce of performance from the application. Majority of them are built around having a stable product with good ecosystem to build on & a wide talent pool to hire from. There is a small subset where the core product is built around extracting the most performance out of products.
Always remember that programming language is a tool. If you are writing code in PHP & delivering business value then you are smart. If you are building your product on the next shiny tooling & using all the cutting edge tech but your product doesn't delivers value to the customer, you are not so smart(Or another synonym of this).
11
u/alphabytes Jun 10 '24
I would suggest you to try it out seriously.. its an awesome language. The tools, frameworks and community support are top notch. The language is evolving at a good pace.
11
u/Emotional_Zebra_815 Jun 10 '24
Oftentime, the right language for the job is not the fastest (Developpment Time or runtime) but it is the language your team has the more experience with and has all the infrastructure in place to work with.
Soo teams that have been doing java for 20 years definitly still used java for newer project also.
10
u/IE114EVR Jun 10 '24
As a language becomes entrenched, continues to evolve, and has a growing, modern, and mature eco system, and there is a large community and talent pool to perpetuate this cycle, then it’s safe to say that “yes, new projects use that language.” And Java is one of those languages. Just like Go, Rust, NodeJS, Python, C#, etc.
Java is still big at companies like Netflix and Google and I’m sure many more.
Though, I will say that I think in the last 10-15 years other languages have emerged to be similarly popular options, I don’t think Java is going away anytime soon. Probably not until there’s one language to rule them all.
9
u/GreemT Jun 10 '24
Just want to say: props to OP for asking this question. It seems you have a genuine mindset to learn, and are eager to be educated. Even though you get downvoted into oblivion, you stay curious.
I hope you learned a lot from this post! Keep it up.
16
u/javahelps Jun 10 '24
I'm working at an AI startup. We use Java for everything including model development (yes you read it right). To answer your question do people use Java for new projects? Yes they just don't brag about it.
Coming to the why Java is still relevant question. Java combines some unique features including but not limited to type safety, performance, plenty of well maintained open source libraries (special thanks to Apache foundation), great ide support, verbose and restrictive enough to help novice developers write better code. With recent features, I would say Java is thriving.
7
u/dzernumbrd Jun 10 '24
Just learn all the languages and let the job market work it out.
Most dev's will have their language idealism die and then they'll transform into code mercenaries that will work in whatever language the employer wants so long as it pays well.
It's best to be a pragmatist in the workforce not an idealist. Everyone (especially managers) hates working with the idealistic supernerds that won't be flexible about things.
7
u/k-mcm Jun 10 '24
Java is a very solid and mature tool. It gets a bad reputation because so much corporate code comes from cheap Java/Spring contractors that have been recycling the same garbage for 20 years. Modern Java is elegant and efficient in the right hands.
I've used many languages and Golang is actually my least favorite. It's new yet feels every bit as ancient as C. I'd rather use C++, Java, or even Scala. I'll learn Rust if the opportunity comes along.
22
u/vprise Jun 10 '24
About people writing new projects in Java: https://github.com/topics/java?l=java&o=desc&s=updated
Quite a lot... I do.
Go is pretty terrible if we're talking about a dead language. Its concurrency model is... Ugh. Green threads... Java is literally decades ahead of it. Error handling in Go is just about the dumbest thing I ever saw. That language makes absolutely no sense. Rust is an interesting language with some new ideas but Go is just stupid, had it not been for Google it would have been on the garbage heap of history ages ago.
6
u/SOMMARTIDER Jun 10 '24
Ignoring the fact that Java is used in a lot of older, existing applications, I see no reason to not use it for new projects as well. It's an awesome language that is continuously updated, and has a good ecosystem.
10
u/pron98 Jun 10 '24 edited Jun 10 '24
A major reason why Java is more popular than NodeJS or Go these days is that it's really good for programs that grow a lot and are maintained for many years, i.e. programs that tend to make the core of a business. In other words, Java scales up very well.
Programming in JS or Go is also not faster than in Java, but I agree that they may be easier to get started with, which could make them "faster" for smaller projects, especially by relative beginners. In other words, Java needs to be better at scaling down. We're working on it.
5
u/t_j_l_ Jun 10 '24
It's used quite a lot in the financial industry, particularly back office processing functions.
5
u/idemockle Jun 10 '24
Instead of answering you directly I'm going to point you to a comment I made a few years ago on my impressions of Java after I switched to it from Python for a new job. Long story short, working on a new team in a new language helped me discover that productivity comes from following good practices and using tooling well, not from language choice, especially for any of the very mature/popular languages.
https://www.reddit.com/r/ProgrammerHumor/s/M5OGJ4PQOD
5
u/Kendos-Kenlen Jun 10 '24
Why continuing to use Java ? There are many many reasons!
First, Java is not slow. That's an idea dating back to the early days of Java, but today the language performs very well. The JVM is powerful, and so is Java. I don't have any good benchmarks under the hand, but I am sure other comments will find plenty of them.
Secondly, the ecosystem is very reach and solid. Whether it's libraries, frameworks, alternative languages (like Kotlin) running on the JVM, you can find everything you need in Java.
Third, the language is usually well structured, typed, and has many features and patterns that help keeping good code quality. That won't compensate the lack of skills a dev may have, but no languages will do so. A lot of code quality tools (integrated to IDEs or not) exist to assist in maintaining great code.
Forth, the tooling / IDE support is one of the best. Compare it to C/C++ which only recently got decent depenency managers, IDEs, code analyzers, ..., Java has always been a good language to work with. Yes, it was verbose, but at least you had help from a good IDE, unlike C++ which is verbose but didn't had great refactoring and analysis tools until the ecosystem renewal started 10 years or so ago.
Finally, you may have the image of Java as an outdated language, but since Java 9, the language evolved drastically to become much more pleasant and modern to work with. Additionally, with the help of Kotlin and other JVM languages, the JVM itself improved and remained totally relevant, ensuring Java also benefited by the progressed brought by these languages.
In my eyes, there has never been a better time to work in Java than now. The past few years has seen a lot of progress in programming languages and their ecosystem which most language benefited from, and Java is no exception to this.
5
u/vladmihalceacom Jun 10 '24
For non-trivial projects, development is not a sprint but a marathon.
If you need to build software that will run for tens of years (banking, insurance, pensions, hedge funds, stock exchanges), the time it takes for the initial development pales to the amount of time you'll have to maintain the software and keep it up-to-date with clients' requirements.
In this case, the advantages offered by Java (type safety, backward compatibility, mature and comprehensive ecosystem, a large pool of available software developers, and tons of training material) will be a safe bet.
And, it's not even necessary that you build the initial prototype faster in NodeJS than you can do it with Spring Boot.
There are lots of FinTech companies that choose Java and the JVM for their platforms. I don't know any finance applications using NodeJS.
5
u/hippydipster Jun 10 '24
The reasons to use Java, from my POV are:
4
u/desiderkino Jun 10 '24
i dont think there is any alternative to java besides c#, which is literally designed to be a java alternative.
imo compared to java, go is like writing assemly. it is not an alternative to java.
node and java are totally totally totally different things. you cant even do multi threading in node. let alone doing anything compute heavy. it is simply not designed for that.
if you want to develop api/backends very fast (in terms of development speed) nothing beats php and php ecosystem. that shit is already built. you just put your logo on it and you are ready to rock. (look at filamentphp for example, nothing like that exists in any programming language). if your goal is to develop and ship things fast (eg. an mvp) both node and java and go does not offer anything close to what php offers.
4
u/teokun123 Jun 10 '24
Development time? Just go to Springboot initializer.
4
u/psyclik Jun 10 '24
I’ve been in the market for roughly twenty years. If anything, Java is more popular now than it was back in 2005. The execution speed is top tier, alongside C++ and co. Memory footprint is still a problem but it’s behing worked on and when Valhalla it’s the ground, it will be much less of a problem. Slow startup has been mostly fixed. Developer speed is god tier (any modern toolkit will have a hot reload built-in and a good IDE will write the boring code for you).
Market wise, at the moment, more than 50% of job postings I see in my region are Java or related, with some flavor of the month js ui toolkit on top.
Java isn’t going anywhere anytime soon.
4
u/[deleted] Jun 10 '24
The better question is why wouldn’t you use a highly battle-hardened language with millions of person-years of experience to draw from?
4
u/JDeagle5 Jun 10 '24 edited Jun 10 '24
Because language itself doesn't mean much. It is everything around it is what matters.Tooling. Developers at hand. Infrastructure. Libraries.
I really don't know any faster alternatives in terms of development. Python, JavaScript? They all have problems with multi threading and maintainability in absence of types, and tooling is just garbage compared to java. What you will often see in those "speed of development" examples are a few lines of hello world. They won't show you what a pain it is to maintain mid to large size projects in typeless language with a rudimentary approach to testing.
And yes, new systems are definitely being built. I work in a unicorn startup company, and it's ecosystem is java-only.
3
u/[deleted] Jun 10 '24
Everyone else has said it so I’ll give a version of it too: Java is used a lot in bigger enterprise companies and usually companies that already adopted Java at some point in the past. Every company I’ve worked for used Java for backend work and it’s usually for bigger monolithic projects or smaller micro services. I would assume some companies adopt Java when they want some language that runs in the JVM and is cross platform. Plenty of other languages exist that can do this but Java has been around since the 90s so it has plenty of stable versions to work with. In the past I’ve worked with migration projects from older lower level languages into Java as a migration path, so it’s a language that companies are comfortable with.
So yes new projects are made in Java all the time and probably will continue to be used heavily for a while I’d imagine.
3
u/i_wear_green_pants Jun 10 '24
Java is really good tech. The ecosystem is very mature and field tested. It performs well and is easy to develop. And there are tons of Java devs out there. So it's also really cost effective language.
I've never seen software where actual Java is the problem with performance. It's always bad code or architecture. And same thing would happen with any other language. Java is not slow at all.
3
u/alwyn Jun 10 '24
Java is extremely powerful and I don't know what alternatives you compare it to in terms of development time... It is much much more powerful than nodejs and you can do much much more with it. It is not really meant to compete with Javascript UI's though.
I use Kotlin for personal reasons but it is still JVM and I can still seemlessly use Java code.
3
u/Pitiful-Cancel4958 Jun 10 '24
I am doing a lot of digital signal processing and usually write c++ processors and python analytic and prototyping code, but naturally, i am a signal processing engineer.
Lately, we started to write a 'managing wrapper' around applications, a service which should run all the time, which we decided to write in Java. Even though, this was the first time since university I wrote java again, the program is simply stable from the first test.
All the Things, that are painfull in c++ and python in large codebases are simply easy in Java.
You tend to write more lines of Code than in Python, but simpler Syntax patterns force you to do more steps inbetween. Type safety forces you to Plan structures ahead.
Garbage collection takes worries about object lifetime or ownership issues from c++ code: some frameworks like qt use a ownership system or raw pointers, which hardly works with smart pointers, otherwise some smart pointer cleans up an object which the framework still uses: as a result, you spend lots of time chasing segfaults and you debug destructors and how you got there. This simply sucks!
Multithreading ist so easy! Each object can be locked simply by synchronized(this), and it automatically works recursively.
My General experience is, i write Java code a little slower than c++ and much slower than in python. But i spend A LOT less time debugging. For large Projects, in my experience, this ist the most time consuming task and thus I do not regret our decision.
3
u/landsmanmichal Jun 12 '24
Yes, for sure. Personally I switched to Kotlin and it is amazing. Developer experience compared to NodeJS is much better. I have experience about 6 years with JS development (node, react, typescript etc) and I still do not love it as Java or Kotlin.
Try Spring Framework and check some videos from theirs Coffee sessions.
Remember - "Boring tech" is productive way how to do things without inventing the wheel. Yep, it is not in hype, but that's totally fine.
5
u/kiteboarderni Jun 10 '24
LOL
6
u/Snoo21443 Jun 10 '24
Verbosity, I like verbosity.
5
u/nutrecht Jun 10 '24
This is meant as sincere feedback since I think this is a great learning opportunity:
It's still a pretty ignorant assumption you're spreading as 'fact' here. Next time you should start with a more open-ended question instead of one that's just completely based on some stuff you read online.
Go isn't faster to develop in than Java. The whole reason the Java ecosystem is so popular is simply that the ecosystem is darn productive. Go and Node don't hold a candle to it in that regard.
So next time, try and ask open ended questions as opposed to closed questions when researching something ;)
2
u/ImTalkingGibberish Jun 10 '24
Define “faster”.
It’s easy to hire Java devs and have them working on existing Java code.
Now, if I star working with Kotlin then I either have to hire Kotlin people or give Java devs time to get used to Kotlin.
So it’s not faster.
And whatever flavour of Java you use, it’s still java so it’s not going to give you performance boosts
2
u/theingleneuk Jun 10 '24
A huge amount of enterprise and closed-source software is in Java, and many if not most greenfield enterprise projects are done in Java as well. You can look at any list of most-used languages and they’ll say python and so on, but the actual most used language in the world is Java.
2
u/seanprefect Jun 10 '24
Sigh, maybe you by yourself working for yourself on a small scope are faster but when the projects get big the ecosystem and tools for java are top notch.
You'd be shocked at how much java is in the world
2
u/DrSlugger Jun 10 '24
Because Java has one of the largest ecosystems for enterprise applications?
I feel like people who ask this question are thinking inside their own bubble lmao. It's been around for years, it works, and it is widely adopted. Companies have applications written in Java, and so they have people who know Java, so they continue to use Java when they "modernize" those services or even create new applications.
2
u/vitingo Jun 10 '24
I much prefer java backends to NodeJS backends because they are much easier to debug. Javascript is async by default, which results in unhelpful stack traces when something blows up. Typescript type definitions with generics and algebraic types are flexible but tend to get convoluted and hard to read.
2
u/ninjazee124 Jun 10 '24
Do you even enterprise, bro?
2
u/No-Adeptness5810 Jun 10 '24
Java is fast to code in actually, albeit you shouldn't use it for small things (in which case yeah node's better)
Any big project is great in java since all its nice features & also it has amazing compatibility across platforms.
It's also quite fast compared to other languages, fast to code in and fast to run. Many new programs are made in java; just look at minecraft (e.g. mods and plugins) or many other java programs.
2
u/thehardsphere Jun 10 '24
The benefit of college is that you usually don't have realistic constraints to work under that those of us who are employed do. As a result lots of things seem like they're okay when they're really not.
Yes.
That was the first selling point. It achieved that portability by offering the JVM as a platform to target, rather than having to recompile for every operating system. The JVM offers benefits besides portability, such as being highly performant compared to most other garbage-collected languages that use VMs or interpreters.
The other selling points were that it was garbage collected, object-oriented, and not nearly as bad to write as C++.
Your question seems to assume that NodeJS provides some kind of unique benefit over Java. I would suggest that the only meaningful benefits of NodeJS ov Java are that it's easier for people who only know Javascript to write something.
The only meaningfully faster alternatives are C, C++, and Rust. Two of those were already available when Java was created, and the last one is really trying to replace the first two.
That makes even less sense, since Javascript is not known for being particularly easy to write. Unlike, say, Python, whose proponents explicitly advocate trading execution speed for development speed.
2
u/Mamoulian Jun 10 '24
Dynamically typed languages aren't faster to write once you start doing anything serious/large because when you call code that's not yours or is old you faff about forever guessing at what the parameters should be and end up having to dig in the source to find out (more faffing) whereas with types the IDE reliably tells you.
And refactoring is a necessary thing.
I'm not just pointing the finger at javascript, groovy is an abomination too.
Spring have a bunch of 'getting started in 15 minute' guides which really do take 15 mins once you have things installed. Other frameworks like Quarkus and Micronaut have even smaller one-page intros.
Typescript is 'not terrible' but those people who love scrapping about lightning fast in javascript will point out it slows them down. I am not aware of any benefits of typescript over java on the back end.
2
u/rbuen4455 Jun 10 '24
What's wrong with Java? Are you hearing bad stuff about Java on Youtube or certain blogs saying Java is old, verbose, blahblahblah?
Honestly, you'll hear criticism about any language, whether it's Python being slow, C++ being complex, JavaScript having messy syntax, etc, etc, the list goes on. It's seriously annoying and very unhelpful, especially towards beginners who are planning on getting into programming and software development, it gets beginners caught up in something they shouldn't get themselves in, which is language wars.
Programming languages are tools, you use the language that is appropriate for the task. But at the beginning stage, you should really focus on the fundamentals rather than language (fundamentals being: DSA, syntax, variables and functions, data types). Once you get the fundamentals down, you can pretty much learn any language.
Now back to Java. Java is a very stable and time-tested language with a massive ecosystem of tools with tons of opportunities, especially in the corporate world and back-end development. There's nothing fundamentally wrong with the language apart from being a little verbose, but being verbose isn't a big deal and the language itself is scale-able, static typing, convenient libraries, and is kept up-to-date. It's worth learning! Just because Java isn't trendy like some JavaScript framework doesn't mean you shouldn't learn Java.
2
u/batman_carlos Jun 10 '24
Companies write features to existing software more often than creating new software
2
u/LordSlimeball Jun 10 '24
I like Java and have been developing with it for over 11 years. No idea why people shit on it, honestly don't care. The combo of spring, jpa and a anar frontend works wonderfully
2
u/Hairy_Foundation3608 Jun 10 '24
I think you might be right, you can code a lot faster in Golang and JavaScript because one reason is that it is not as typesafe as Java, which comes in handy when you want to try something or build a small application with limited functionality, but as soon as you try to build a big or growing enterprise application it can become a total mess. I saw a lot of big JavaScript (NodeJS, React, …) applications which weren’t maintainable at all and I think that’s were Java shines due to it‘s typesafty and it‘s pretty good refactoring possibilities in most IDEs.
2
u/Sbarty Jun 10 '24
I also thought Java was “dead” when I was started college 10 years ago.
You’ll soon understand why that mindset makes no sense, if not after this thread.
2
u/Lampadina_17 Jun 10 '24
java is elegant, portable, scalable and with experience fast to write
2
u/BizzyIzDizzy Jun 10 '24
I liked Scala, now I really like Kotlin + jOOQ.
I do NodeJS for prototypes, Kotlin for stable enterprise deploys that don't care much about the server costs and Go for performance/server cost optimized deploys.
2
u/progmakerlt Jun 10 '24
Define “faster”? 🙃 That it takes less time to write a couple of lines of code?
The main things, when selecting language for development are:
If it takes less time to write code with some exotic language - that is great. Good luck on finding developers to support this exotic stuff.
2
u/Mixabuben Jun 10 '24
Because it’s nice
2
u/MaDpYrO Jun 10 '24 edited Jun 10 '24
NodeJS is not faster than Java, what the hell are you on about? Did you actually benchmark anything or do any sort of investigation?
But to put it briefly:
Modern java versions are quite good. Especially with all the modern frameworks (Spring, Lombok, Gradle, Kotlin, Groovy interop, etc).
It's also very robust and the typing system is much more reliable than JS. It generally builds code that is more predictable, performant and less buggy.
If you want to compare it to js, your main argument should be that it's faster to hack something together.
But Java has a stronger ecosystem and lots of open-source projects. Hell, even just the strong Kafka libraries is a good argument in itself.
It's more efficient for scalable backend services, more energy efficient. The only downside is that it's heavy on memory usage, but it's making strides in certain frameworks there lately too.
The javascript ecosystem is built on mounds and mounds of questionable node packages, which often break and introduce security risks. I think you need to study this a bit more.
If Java is so bad, ask yourself why major tech companies like Amazon and Google have it in widespread usage.
2
u/gekigangerii Jun 10 '24
Don’t take ThePrimeagen videos as fact. He’s just learning as well, I have seen some really dumb takes from him.
2
u/Scf37 Jun 11 '24
Ok, here is why people choose Java for microservices:
Then, why not Java:
2
u/[deleted] Jun 11 '24
Java is far more performant than js. Backend js is kinda ew. Golang has a lot of advantages as well
2
u/dbaeq90 Jun 11 '24
I tend to gravitate to Java when I can due to how mature it is and how well dependencies are managed. I use nodejs to run smaller more compact stuff, mostly AWS lambdas but when it comes to complex operation I still go with Java.
2
u/[deleted] Jun 11 '24
Kotlin > Java
still jvm I know but I realy have to say kotlin is so nice
but old big corpo change in speed of a snail on sleeping pills.... so I work 99% with java
2
u/pivovarit Jun 11 '24
Examples?
2
u/Ewig_luftenglanz Jun 11 '24
And yes, in my company we use a lot of Java for new developments, currently we are developing some applications in java 21 and gonna migrate some older stuff from Java 11 to 21, starting next month.
2
u/ZeroGainZ Jun 11 '24
Tbh, in my experience, new developers always seek the new stuff, thinking they're on the cusp of this great new technology.
These languages always seem nice in trivial examples or smaller codebases.
Then everyone realizes the libraries and frameworks aren't there, and so these new folks start building them. Years go by and they reinvent things java, c#, and c++ has had for years, except worse.
Then they wake up and realize they've spent years solving problems that have already been solved.
Languages haven't really innovated in decades. The best part of golang is it builds to a static binary. Their VM isn't better than the JVM. Channels are really overrated and barely reduce the work with threads. They toute not being OOP but every code base has constructor functions and receiver functions - just methods with extra syntax.
All these other languages compile to LLVM or the JVM, so they're essentially the same as everything else except with restrictions.
Rust is at least doing something kinda interesting.
Node/JS is a disaster. Typescript is saving their ass because it's from the makers of C#.
All languages eventually become Java - and I hate java. Programming sucks. Languages suck. Frameworks suck.
People use Java because nearly everything is solved already. You go to work, write some code, go home and hang out with your family. It just works. Same with C# and kotlin.
Most other languages feel like going to war at work. With Java you learn the old ways and things just flow. Tons of jobs, they make more, and they work less. It's a solid middle ground.
2
u/Miss_Breadfruit8244 Jun 13 '24
I just love it, that's why
3
u/kingroka Jun 10 '24
What a thread! Ill just throw in my two cents. Personally, I like java because it can run on any OS and has a structure that is organized in a way that my brain likes. Other languages like JavaScript and python are too unstructured for building organized code for my larger projects and languages like C++ or Rust are overly complicated for most of my small projects. Java sits in a sweet spot of codability for me. Plus if I really need to use those other languages (for a job or something) Java is similar enough to everything else that I can easily transition.
1
u/[deleted] Jun 10 '24
yes java is thriving and improving and is imo one of the best languages out there and I dont see a real competetor for the JVM. kotlin seemed to become somewhat relevant but stayed in android and jetbrains context.
1
u/Valuable-Fun-5890 Jun 10 '24
Because its perfect to make real world based programs
1
u/HeftyCrab Jun 10 '24
Yes lots of new work is done in Java. There are also lots of Java devs, so it makes sense from a hiring perspective as well as you can easily hire the skills you need. Doing that with some niche language might be seen as more risky from a business perspective. If someone leaves and you cant hire a replacement it might have a very negative effect on the business.
1
u/MentalWolverine8 Jun 10 '24
Java runs on billions of devices all over the world.
1
u/TheSkyNet Jun 10 '24
Find an ecosystem you like using and just use it, all of them have massive ecosystems. You can pick more languages up as you go along and don't worry about the speed or performance they're largely irrelevant metrics.
1
u/qdolan Jun 10 '24
Java is massive in big enterprise, it and the JVM are extremely fast, safe, mature and there are multiple implementations for just about everything you could ever want already out there. Development, maintenance, build and deployment tooling is also extremely mature as it has been around for decades and all the typical problems with developer efficiency have already been solved.
2
u/mnaa1 Jun 10 '24
Java runs on over 3 billion devices.
1
u/NeoChronos90 Jun 10 '24
A short answer is: yes, because there is a shortage in at least mildly skilled developers, but there is no real shortage on java developers So corporate will keep making java applications, people will learn java because work is available, corporate will stay with java because workforce is available
1
u/hidazfx Jun 10 '24
As someone who works with Java at a financial institution, I think the biggest thing it has going for it is maturity. Java has incredibly mature tooling and packages of any language I've worked with. I'd love to hear what other people think, or if they disagree with me.
1
u/mondain Jun 10 '24
Moving quickly to my 3rd decade with Java; I primarily work on a highly scalable streaming media server and we wouldn't chose anything else as our base (there's C/C++ in there too, of course). New projects here also target Java, but the best implementation for the given ecosystem is always a deciding factor.
1
u/Nedunchelizan Jun 10 '24
I am converting go lang to java .
1
u/sebnukem Jun 10 '24
It works.
1
u/SnooPeppers7217 Jun 10 '24
Spend some time coding in C++. Then some time writing in C. Then some time writing in Assembly.
You'll see why people "still need" Java.
1
u/qK0FT3 Jun 10 '24 edited Jun 10 '24
For me java is very fast to develop backend and micro apps.
I can just create a microservice connect it to the network just in cokuple hours. It will be safe and bug free because I know the packages I use are almost perfect(not100%).
I have done a small machine program that runs under very small resources very easily under a day and we shipped the code tested on field adjusted on field very easily the product was ready in 1 week.
Unlike what people claim it to be. It is extremely fast to develop java apps.
I am not even talking about how fast it works if you tweak it. Specially my friend works in finance and they either have to develop cpp or Java.
Well I use other languages as well but this has nothing to do with other langs so I will not say much about them.
We also develop all new projects on java/kotlin(depends on the person) as a startup. Why it's extremely fast to roll out updates and release. We just click install script and everything is uploaded after build. Then we only need to change docker config or put it in the server etc.
We had so much trouble with js environments that we had been working on frontend for a month which we developed a backend for it in 2 days. Js just never works as expected.
1
u/[deleted] Jun 10 '24
Money. Both sunk cost for companies and paying jobs for devs. Same as COBOL abd Fortran
1
u/kadakpav Jun 10 '24
I love programming to interfaces. In Java it is very easy by using OOP concepts like Inheritance and polymorphism to implement great design patterns which goes a long way in improving the maintainability and extensibility of the code. GoLang's composition is not quite the same thing.
1
u/smors Jun 10 '24
Java has been around for ages, and is unlikely to disappear.
So you can reasonably expect it to be maintained for the next couple of decades and for developers to be available for hire. And that matters a lot more than development maybe being slightly faster in a younger language.
For many, the alternative to Java is not golang but c#.
1
u/namsin_za Jun 10 '24
Java is a great language and mature eco system and is supported by all the big SAST ans IAST tools. Easy to govern in large organizations. Sure there are definitely spaces golang or c++ might outperform - but the instances where that is really required are few and far between. For 99.99% of projects out there java is fine.
1
u/Misfiring Jun 10 '24
Other languages may do certain things exceptionally, but Java is the language that does everything well.
1
u/LOL_WUT_DO Jun 10 '24
I build stuff using Java 22. The virtual threads are such a joy to use. Not needing to use async/reactive is an absolute game changer.
1
u/Nikarmotte Jun 10 '24
Java is a lot more mature, it has had generics for years when Go only introduced them last year or so. There are so many libraries as well.
It also takes time to become as proficient in another language. The workforce would become a bottleneck if all new projects were written in Rust.
I think you also become attached to a particular language, especially when it's your first, but hopefully it doesn't prevent you from learning others too.
1
u/OliverPK Jun 10 '24
It's so easy to start a project in java.
1
u/Leverkaas2516 Jun 10 '24 edited Jun 10 '24
Your Edit indicates you think it's faster to develop in NodeJS than Java. Is that objectively true? I don't know, because I don't know about NodeJS.
Assuming it is, my gut feeling based on long experience with Java's tradeoffs tells me that a 500,000 line multi-year project written in NodeJS by a team of developers of different skill levels might well be much harder to maintain than the Java equivalent. Besides Java's top-tier ecosystem of available libraries and tools, it's hard to find a tool more amenable to writing maintainable code. It's another major reason people still use Java.
A company that's going to invest several million dollars in a code base that's going to be the backbone of its business might well value maintainability over development speed.
1
u/realgoodusername1 Jun 10 '24
Fintech entered the chat
1
u/o_tiagop Jun 10 '24
Try something like Quarkus for micro service development and you'll see it's one of the best dev experiences with so much capabilities available to you
Modern java is much better than java 8. Plus the ecosystem of maven packages and plugins is huge
1
u/Altruistic-Rice-5567 Jun 10 '24
Excellent libraries available. Well structured and typed language. There's a lot to love about Java.
1
u/Awelisk Jun 10 '24
I've started some java projects recently and I am just so comfortable writing class after class, test after test. Don't get me wrong I'm not a TDD fanatic.
Java excel at the the most problematic parts of programming that people tend to ignore.
-When structured correctly, almost any dev can navigate your project with ease.
There is only one huge bottleneck that comes with enjoying the other benefits, dependency management. That will be the most important and the most difficult part.
While smaller projects could benefit from the simplicity of not type safe languages, extending their codebase surely will lead to spagetti code after a while.
Java is a versatile language and hard to master, but worth the effort in the long run.
Remember this,
"The only way to go fast, is to go well."
1
u/Misophist_1 Jun 10 '24
Despite all the grudgers and enviers, Java hasn't just held its ground against other languages, it still trying to get ahead of them. And it is tightly bound to the evolution of the JVM, which is used by many other languages, namely Kotlin which is frequently cited as a competitor. Another one is Grovy. There are libraries that allow to run Python, Ruby and Prolog on JVMs.
Currently, there are scheduled updates of the Language Spec and libaries every 6 months. With changes disscussed in the Java Community Process (JCP) That is faster and more frequent than in most other Languages. There are JVMs available for many environments, plattforms, and operating systems.
Java runs on all recent x86, amd64, arm64 plattforms on Linux, most Unixes, Windows & MacOS, as well as on huge IBM Mainframes in OS/Z, but also embeded as language for database triggers in Oracle and IBM DB2 Databases, and used as menue scripting language for Blueray players and settop boxes.
Recent improvements are geared to make paralleization and multithreading easier, safer and faster. They are also building a library that is geared at low level parallelization utilizing vectorized assembly statements available on graphic cards or other specialized coprocessors, in order to make this accessible to Java.
With respect to development time, I don't think, Java has any problem with its speed, although there had be some efforts to get a bit closer to script like development cycles with a repl-like approach.
Development speed is always a complex interplay of the developers thoughts & habits, and the task at hand. I had frequently to hop between languages, and I never found any one language, that was 'faster' in development, when it comes to problems that are a bit more complex than shoving a string into a file, and sending that file into socket.
The gruntlers gruntling about excess semicolns, or some minor library defficienies, or missing features, or being obstructed by the strong type system are just gruntlers: we should be beyond the point of complaining about 'too many keystrokes'. And if features are really lacking, rest assured: what the JCP isn't going to deliver any time soon, you won't require anyway.
Some grudgers state: Java is the COBOL of the present. Well, COBOL was developed and gained traction in the 60ies. When I started in my first Employment in the 90ies, most companies with a mainframe still were 80 % COBOL shops, and they kept and maintained this code right into the 2010s. Therefore I trust, that we'll see Java development for the next 20 years at least.
1
u/[deleted] Jun 10 '24 edited Oct 05 '24
literate squeeze nose unpack head caption modern instinctive quaint whole
This post was mass deleted and anonymized with Redact
1
u/obi_wan_stromboli Jun 10 '24 edited Jun 10 '24
I'm not a huge java fan personally, but the concepts it teaches you are super important. It's also used in TONS of stuff, for one example the Spring web framework powers a whole lot of web infrastructure in my state. This language isn't going anywhere
1
u/imatt3690 Jun 10 '24 edited Jun 10 '24
For me. Dependency management, libraries for damn near everything, easy multi threading support, Data streaming APIs. I don’t have to get caught up in explicit memory management but I have access to do so if I want vs having to verbatim.
1
u/[deleted] Jun 10 '24
A few reasons I dislike Java: 1) cold start times, 2) inability to compile to a single native binary without things like GraalVM, 3) the amount of stutter that even C# fixed with the `var` keyword.
1
u/Quaglek Jun 10 '24
People use Java because they used Java
1
u/itemluminouswadison Jun 11 '24
Its a great language, great ecosystem, and popular, so finding devs is easy
Anecdotally it's less bootcampy so java devs tend to come from more serious cs backgrounds
1
u/EnIdiot Jun 11 '24
Python has to enforce standards typically by naming convention and relies upon good practices by each developer. While not perfect, Java ensures that no one programmer wrecks a software ecosystem. You have to develop in a way that all but ensures you will have a usable and maintainable code base.
1
u/[deleted] Jun 11 '24
Its literally the best programming language out there
1
u/kelvify Jun 11 '24
Scalability, JVM, even tho I’m not a huge fan of Java, I certainly can see a specific need for it. My list of complaints are long but in the end, it performs and harder to push breaking changes.
1
u/kumar29nov1992 Jun 11 '24
When you say development time, i beleive you're only speaking about initial development and not maintenance. My opinion is, maintenance is easier in verbose typed languages
1
u/sysKin Jun 11 '24 edited Jun 11 '24
Why do you think Java has slower development time?
If you think it's the famous verbosity, then no, it's handled just fine by having an IDE that understands the language and can write things for you. Plus modern language features (lambdas, records...) reduced that too.
If you mean how you can quickly make a web endpoint, Spring solved that years ago. Moreover, any boilerplate dwarfs in comparison with the actual business logic you have to write to do the actual stuff.
Or do you mean some other aspect of Java being slower? If so, which?
Don't get me wrong, I bet a language/environment (Go, NodeJS) specifically designed with a built-in web server for web app development can reduce the time from zero to your very first endpoint.
Java was not, and indeed lacked in that area in the JavaEE days. But now, Spring and Spring Boot give us pretty much the same experience, perhaps with a "few" more megabytes to set things up. But we're talking minutes at the beginning of the project, that is really not significant in the grand scheme of things.
After that, the fastest-to-develop language is mostly the one you're most familiar with.
1
u/jalexoid Jun 11 '24
The completeness of the ecosystem is the short answer.
I code in multiple languages(Java, Kotlin, Golang, C, Python), and my ability to find a library or a tool to make my work go faster is unparalleled.
Java may be dwindling, but it's still one of the easiest languages to build a complex system. Need an obscure library to validate HL7 FHIR? Good luck finding anything for Go or NodeJS.
1
u/Anxious-Pace-6837 Jun 11 '24
legacy code is written in java and majority of programming jobs are not building new things, it is maintaining the legacy code.
1
u/rcraver8 Jun 11 '24
People rarely build new systems, the vast majority of Dev work is improving something already built.
1
u/galtoramech8699 Jun 11 '24
A question based on fallacies won’t get the expected response
1
u/[deleted] Jun 11 '24
Because Android.
1
u/ramksr Jun 11 '24 edited Jun 11 '24
Faster development time? You mean for Hello world?
I'm not sure if you did Java development with Spring Boot, Lombok, Spring Data, JPA, and REST with swagger tools, to name a few. I can hit the ground running in just a few days, even setting up a prod ready microservice and more.
Initial speed with other languages, maybe yes. In the long run, Java is a much better choice, not to mention the mature ecosystem, etc...
1
u/[deleted] Jun 11 '24
I still use java. I don't mind the verbosity as long as it's easier for me to understand the code
1
u/dark_mode_everything Jun 11 '24
You being a teenager asking why people use java when they can easily deploy a nodejs service is perfectly fine. The problem is that some professionals do the same.
1
u/BasicBroEvan Jun 11 '24
Why do so many ask this like it’s bad. I’m a .NET developer right now but I loved using Java in a few classes back in school. Why would you use it? Good language features and ecosystem
1
u/AnimationGeekNerd Jun 11 '24
1
u/epegar Jun 11 '24
I would say in the enterprise world, depending on the task, but development time can be as little as 20% of the effort. You need to gather requirements, design, develop, test (quite often multiple types of tests), document. You also might have an unnecessary amount of meetings, code reviews, stand-ups, emails and so on.
Of course what I described above varies from company to company, but it can give you an idea that in many of them, reducing development cost is not such a big saving.
From a more technical POV, I consider that java, besides its wide ecosystem and community, excels in maintainability. I am not that much familiar with other languages, but having migrated some large projects across different versions of java (plus some other big refactors), I value having a language that compiles (rather than just be interpreted). Of course you end up relying on tests to verify behavior, but getting the "compile" errors in advance can save time and make things easier.
1
u/bud_doodle Jun 11 '24
Just out of curiosity, what are the much faster alternatives to Java?
1
u/[deleted] Jun 11 '24
I would say this about python,.not java...personally. I don't see the advantages of it.
1
u/ExpensivePanda66 Jun 11 '24
If I had a choice between Java or go, I'd probably go with Java.
Go is such a hot mess of cool ideas that aren't actually all that cool when you have to actually maintain or debug them, I don't know where to begin.
1
u/Ok_Giraffe1141 Jun 11 '24
Cause you probably touch Java hundred times a day?
1
u/SauliusTheBlack Jun 11 '24
As a java professional: There is a lot of demand for it. It is mature There is a lot of support online It is well known It is actively developed It has a huge ecosystem
1
u/Swimming-Twist-3468 Jun 11 '24
Java and all derivatives are the most resilient and reliable tools that are out there on the market. The rest is just hunk of junk that breaks the moment you stop looking at it. That’s what corporate environment and my own development has taught me. It is built to last.
1
u/thecodeboost Jun 11 '24
Well, there's the heuristic argument. Many capable developers and shops choose it, especially for greenfield development, so assuming you buy into aggregated expertise you could easily make the argument that all else being equal it's the most effective language for the tasks its being used for.
As for Golang (or any other language that is often used for backend development) I think people get muddy about the facts and pros/cons when evaluating languages for their projects. I've been developing in Java (~20 years), Python (~25 years) and Golang (~early adopter) professionally and I can tell you that in my experience Java is the fastest way to develop production code at time of writing, by a healthy margin (caveats apply if your workloads are in specific domains more suited to Golang or Python but those are rare).
Let me phrase it this way; I'd happily bet half my life earnings on Golang expiring well before Java and Python do in popularity, adoption, job availability and codebase count. If you find yourself thinking your Golang projects complete much faster than either Java or Python then more likely than not you're comparing apples and oranges. You only spend single digit percentages of time coding fresh code on average so once you factor in security, performance, maintainability, testability, refactorability etc. I struggle to think of any production code producing pipeline where Golang would win out (again, specific domains such as devops, CLIs etc excepted)
1
u/PuddyPete Jun 11 '24
From what I have heard, mostly because a lot of legacy codebases that are still in use are written in Java, and it works.
Also it is kind of easy to learn but not as high level as something like python, so a lot of people end up learning it as beginners. That is why I use it.
1
u/sudoaptupdate Jun 11 '24
I've worked on enterprise applications using Go, Java Spring, NodeJS, and Django. Java Spring by far is the easiest to develop in, test, maintain, and deploy. Like others have mentioned, the ecosystem is unmatched.
1
u/LeMads Jun 11 '24
Other commenters already gave good points, I'd just like to add that new versions of Java come out every 6 months, with new features in every release.
Check out openjdk.org
1
u/plastikbenny Jun 11 '24
4g languages had much shorter development time. If this was the most important metric then those would have won decades ago. But.. they weren't general purpose which is apparently important as well.
Many enterprise orgs asses the quality of their IT by iso 25010, with portability being one of the metrics. You probably haven't experienced the pain yet when an org has to rewrite from scratch because the were caught in a vendor lock-in and couldn't just port to another platform. Being platform independent is important. Since no other general purpose compiled lang takes this metric as far as java, expect to see Java in future systems...
1
u/[deleted] Jun 12 '24
bc cpp is garbage
1
u/SenorSeniorDevSr Jun 12 '24
Yes. It has had advanced features like "GENERICS" that Go only just got for a long time. Oh, you think that was outdated and below the belt? That's fine, because it is. Just like... what you wrote.
I mean, speed is one reason. I don't mean just execution speed, but things like "I want to bulk insert 50k rows and I would prefer if I could do it in very little time on Oracle Free, so my tests run faster". That's very simple in Java, it's not as simple in Go. Just check this stack overflow post. The sort of simple Enterprise thing that we all do all the time.
https://stackoverflow.com/questions/12486436/how-do-i-batch-sql-statements-with-package-database-sql
(Granted the java example should have a counter so you committed every 100 or so inserts, but that's beside the point)
You have to consider the possibility that for the sort of tasks Java gets used for a lot, it's actually pretty comfortable to use. If you want more dynamic Java, here's a fun little challenge. Build a class that has a DataSource, takes a query string and returns a Map<String, Object>. Should be laughably easy. Do the same in Go, TS, or other language and ask yourself why Java is supposed to be harder. It really isn't.
1
u/frankielc Jun 12 '24
Java is wildly used in the financial industry. From banks to hedge funds, it's common for new projects to be Java based. You'll also see a lot of Java containerized. While Java historical selling point was "write once, run everywhere", the Java Virtual Machine is such an incredible piece of software that you'll get almost C like performance with a lot less surface error.
It will also be easier to integrate into existing APIs.
Regarding development time, Java is a pretty fast language to develop in.
Being verbose is pretty irrelevant, any IDE that's worth the name will autofill it. Development time really starts when you've grown from writing simple and isolated methods to support the changes that come into a full platform that experiences the change of time. And Java's pretty good on that scenario. You can obviously shoot yourself in the foot in a multitude of ways, but Java sets you on a pretty good path.
1
u/Jamishon_ Jun 12 '24
Easy to learn, fast to produce product, but runing slowly ,who cares
1
u/vafarmboy Jun 12 '24
I'm late to the party, but… define "development time". Time spent getting POC up? Time spent to operationalize full production quality code? Time spent on maintenance after primary development?
I haven't seen this take yet: One of the reasons people use Java is the halo effect. Big corporations use it, so developers learn it. Since they know it, they use it else where. This leads to the question, why do big corporations use it?
Oracle Support.
If a national bank has a problem with NodeJS, they're SOL and have to fix it on their own. No one "owns" Node and therefore no one can be accountable for it. If said bank has a problem with Java, they call their Oracle Support Rep and an engineer is on the line with their developers fixing the problem.
If there's a problem that can't be worked around in NodeJS development time is effectively infinite as a fix in indeterminate. If there's a problem in the JVM development time is effectively infinitely faster since Oracle is on the hook for it.
1
u/Personal-Factor-3459 Jun 13 '24
Currently most popular language is Python but most of the softwares are written in Java or in c as this languages are fast compared to python
1
u/IamGah Jun 13 '24
Because I‘ve got customers using <somethingEnterprise> for20+ years now.
Wasn‘t always a smooth ride but usually it‘s ‚just recompile and you‘re good to go‘
show me a ‚..modern..‘ platform which …
/the young‘uns these days. <old_people_yelling_at clouds.bmp>
1
u/rooney39au Jun 14 '24
I agree with a lot of commenters on here. For up front reference, I do not like Java, I am a C# fan boy, but that is really not the point. I run a software development company and it is about being able to get software completed and out there that is robust and works to the client's needs.
Java, and C# as well, have been around for a long time and both have very mature environments and are very well supported. I am not necessarily saying other languages aren't but the length of service is huge.
Having said that, a lot of the reason behind choosing a language is based upon the human resources available. If I have 10 Java devs from the previous project, why would I choose anything else, that would just be stupid. It's one of the partial reasons decent languages stay around for so long because staff know the language and as a business owner I probably don't want to train my staff to use another language when the current one they know works perfectly well.
1
u/igderkoman Jun 14 '24
In the US it’s only used by old school enterprises via $7/hr offshore devs
1
u/dannycrts Jun 17 '24
Let's be honest. Java is a great language, but it is painful to read. If Kotlin was just java with a Python-like or a Golang-like syntax, it would have literally killed Java for good.
1
u/laplongejr Jun 19 '24
That's what the devs 1 generation ago at my job wondered about why they should switch away from Cobol. Now that the recrutment utterly failed, they wonder if they should try that fancy Java 8 thing before the last ones go to retirement...
Who cares if a software is fast, if nobody knowing the language is available?
1
u/InstantCoder Jun 28 '24
We are still developing new applications with Java 17 and only with Quarkus. We left Spring Boot and we are glad we did this.
I can say that Quarkus is the most cutting edge Java framework at the moment that can rival easily with other popular non Java frameworks.
1
u/maw2be Jul 02 '24
If you write enterpise level application, speed it's not always main factor when you choose language. Other are stability of language, scalability of your application, support to envirovment and infrastructure etc. When you write this kind of application, you don't want change it again in next year or two when something has change within language.
And now my personal opinion. Node.js as backend is a bad choice, syntax of js it's not friendly. But it's only my opinion.
1
u/xingstarx-2023 Aug 24 '24
Java is relatively cumbersome, and the code is more verbose to write, but the code written by senior Java experts and novices is similar, and it is not easy to have various novel writing methods. For complex projects and large-scale team projects, it is still very convenient to maintain and iterate. If it is an individual or a small team of several people, you can use anything, and the development speed is the priority. However, if the scale is large, this stable programming language is still suitable. The system is also more secure, easier to maintain and easier to take over.
1
u/OkMathematician3516 Sep 25 '24
Verbosity and development time should not be factors anymore with the plethora of LLM-powered code generation tools that are available today.
1
u/Dani_E2e Nov 16 '24
Java is very fast, often faster than python or other interpreted code and runs on many systems without installing. I am using it for Linux and Windows in same manor... UI is not the best and starting after loading long. But then it works fine and fast. In many operations not far away from C.
And syntax is very similar to common C that makes it easy to comei n..
1
u/AdministrativeHost15 Jun 10 '24
The selling point of Java in it's glory days was the the developers could write the code on standard Windows desktops but it could be deployed on powerful Sun servers. You're correct in saying that much has changed since those days.
1
u/[deleted] Jun 10 '24
I write java because I work as a java developer /s
1
u/roberp81 Jun 10 '24
there is still nothing better than Java
Golang is a toy that loses hype and market every day.
1
u/terserterseness Jun 10 '24
Java no, kotlin or clojure yes. Same reason though.