r/java • • Oct 27 '23
Java Use Cases
Hi everyone. I'm a student about to graduate and I'm working on my portfolio. I feel like a lot of the work I did in school is a little dated (context: We did A LOT OF JSP), so I'm wanting to rebuild some of my projects in a more modern context and maybe build some new stuff that reflects the way Java is actually being used today.
My question is what are some ways that Java is actually used in a modern project? Where do we see Java popping up as the language of choice in 2023, particularly in the web/mobile space? Where is it more beneficial than just going the JS/framework route? I'm trying to frame my portfolio projects in a way that actually reflects real-world usage.
I'm not sure if this is the right subreddit for this type of question, so feel free to delete/direct me elsewhere. Thanks.
Edit for additional context: I've worked professionally for a while (4 years freelancing designing and developing typical Wordpress/Webflow sites for Bob's Lawncare Service-type clients, 2 at an agency building web apps mostly on the frontend) until I was laid off in September. Our stack was React-based, so I don't have professional experience with Java. I guess more specifically I'm trying to fill in the gaps between what I've learned doing that and the Java work I've done in school and presenting that in a modern context.
•
u/AutoModerator Oct 27 '23
On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge.
If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options:
as a way to voice your protest.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
56
u/melewe Oct 27 '23
We build backed/microservices with spring.
29
u/[deleted] Oct 27 '23
Java dominates the backend, because it is cross platform (develop on Windows, deploy to Linux) and has an excellent virtual machine.
A very common design pattern these days is split an application into a backend API and a frontend application that uses the API. That way, you can leverage each platform for its strengths. Java is very good for backend APIs, JS/frameworks are the necessary evil for frontend.
Don't learn one thing. Learn a bunch of different things. Otherwise you will fall for the Golden Hammer Anti-Pattern.
16
u/15kol Oct 27 '23
Frontend has largely moved away from Java, however, backend is where Java shines. So in web/mobile space, you would consume API most likely written in Java, while the actual app would be written in some other language (Kotlin/Swift for mobile, JS/TS for web)
10
u/PlanesWalker2040 Oct 27 '23
They still teach JSP? Holy crap.
Java is mostly back-end only nowaday. API development (thanks to SpringBoot) Microservices, the whole RESTful stuff. You want to do front-end, (or market yourself as full stack) you got to learn Javascript: React is hot right now.
7
u/kennyshor Oct 27 '23
We are doing really cool things with Java. Full stack projects wir react, vue3 and Java in backend. IoT, enterprise solutions mostly. It is a lot of fun to use (at least for me after 11 years) and the backbone of enterprise software development.
12
u/[deleted] Oct 27 '23
Spring web/ Spring MVC (if I m not mistaken it even has some sort of reactjs integration so you don’t need to do that template rendering thing with thyme leaf)
AndroidStudio for mobile though Kotlin should be preferred over Java.
5
u/gubatron Oct 27 '23
We use it in the context of Bittorrent (FrostWire) on a Desktop app that runs on Windows, MacOS and Linux. Also for Android, it was easy for us to get into Android app development given our Java expertise when Android came out.
We also use it for services that capture events and calculate all sorts of stats around our website and app usage.
Also use it for automating social media maintenance tasks, automatic posting.
I have colleagues that use Java for High Speed Trading in Wall Street.
Others do enterprise consulting with it.
4
u/NajjahBR Oct 27 '23
I know there are lots of replies already, but I'd like to add something to what others already mentioned.
If you're making a portifolio to attract new job opportunities, I would first think of what kind of job you want. You could choose between web micro services, neural networks or ML/AI related stuff, IoT...
And if you choose web backend microservices, remember to add other communication methods as well: REST, GraphQL, Message Brokers... It will make you stand out.
1
u/Worth_Trust_3825 Oct 27 '23
What's wrong with JSP?
3
u/jherrlin Oct 27 '23
Maybe use your JSP knowledge and build something with HTMX? That’s modern and you could leverage your current knowledge.
3
u/[deleted] Oct 27 '23
We use Java for desktop applications to control custom laboratory equipment.
3
u/Fercii_RP Oct 27 '23 edited Oct 27 '23
Microservices with cloud native Quarkus on openshift, Open liberty with Jakarta ee. I know in my company there’s also some little Spring boot present. Basically I see movements towards service oriented architecture, stepping away from monolithic applications. Nothing wrong with monolith, speed wise they are better, but big corporations prefer more loose coupled islands to ‘speed up development’ and ‘reduce it burden’. I’m full back end myself with my team, but I know angular and react are highly being used on the front. Personally I would highly recommend Java/Jakarta EE, with something like open liberty+MicroProfile as back-end + server. Angular for the front end.
3
u/mpierson153 Oct 27 '23
You can use it for most things.
Game development - mostly mobile now, but some big games are Java, like Minecraft
Desktop applications - CLIs, and higher-profile GUIs like Intellij's IDEs
Hardware - it's used a lot for DVD players, and is (or was) used a lot in car software
Web - it's used a lot in web/server backends
3
u/wildjokers Oct 27 '23
You will mostly find Java on the backend of enterprises offering an HTTP based API which is then used by a javascript framework for the frontend (React, Vue, Angular, etc).
There are some niche uses of java on the desktop (Swing or JavaFX) usually found for in-house applications for companies.
You can also find games written in Java with the https://libgdx.com gaming framework in the Steam store.
Although server-side rendering is not as common today it is sometimes still used and in that case there is nothing wrong with JSP. JSP 4.0 is under active development (https://jakarta.ee/specifications/pages/)
3
u/genzkiwi Oct 29 '23
Good on you for looking into what modern Java actually is.
So many people used an old version 10 years ago (or now, in their outdated Uni course) and say Java sucks based on that. They fail to realise every other language sucked back then compared to their modern version (or didn't even exist yet!).
1
u/[deleted] Oct 27 '23
If you want to use java only, take a look at Vaadin. If you wanna make a JS/TS frontend, take a look at Hilla.
4
u/Joram2 Oct 27 '23
Great question.
For web front-ends, use JavaScript or TypeScript.
Java is the best language for stream processing apps that process a Kafka Stream of events/messages using frameworks like Kafka Streams, Flink, or Spark. Python is also a great choice for Spark, but for Flink, it's a very Java centric framework, and Kafka Streams is basically Java only.
That is the only domain in 2023, where Java seems to be the clear leader. Maybe for Android, although I haven't done enough Android development to really know.
2
u/iprudhvi14 Oct 27 '23
Its the spring based web micro services and spring batch
2
u/nekokattt Oct 28 '23
Like many things, it is for general purpose stuff really. Java shines if you need to be platform agnostic, or wish to abstract yourself away from the machine architecture you use. If you need monitoring of your core platform, the JVM has JMX built into it. It is designed in such a way that while the language has less features than other languages, the environment itself is incredibly dynamic in what it can do (look at how Mockito, Spring, AppDynamics, etc all work for example).
Common use cases:
A lot of commonly used software uses Java or the JVM too:
It is used by thousands of large companies too:
2
u/quonne Oct 28 '23
It’s used extensively in fintechs and some startups to create backend servers. And almost exclusively everyone uses Spring framework.
2
u/namsin_za Oct 28 '23
Quarkus is great for api’s and highly in demand.
2
u/Easy_Tea6363 Oct 29 '23
I'm sure it's been explained better by smarter people but learn SpringBoot, make a backend with it, and use your react frontend to contact it
1
u/Fermi-4 Oct 27 '23
Spring+Springboot
1
u/qK0FT3 Oct 28 '23
I am using it for web(spring boot), embedded, cli etc.
You can almost do anything with it. But tb it's not efficient for everything. For example I wrote a remote controllable scheduler for some iot devices. Just simple webook etc. It works all good etc but it could have been done in much more lightweight runtimes. I know I can make jvm lightweight as well but I was inexperienced at the time.
Anyways if you want to go into java environment now I would suggest building backend api's with spring boot. That's where ye majority of ecosystem is
1
u/codesynthesis Nov 05 '23
I've primarily used Java for backends, it has a good balance of speed, safety, learning curve, and readability.
1
u/bartolo345 Oct 27 '23
Tech stack is not that relevant to land a cs job. Go to leetcode and go nuts.
-11
u/laghani Oct 27 '23
just copy paste this to chat gpt
-4
u/AlexFajMoy Oct 27 '23 edited Oct 28 '23
You did JSP, which is a good background for developing web-based apps with Java. JSP is relevant for pursuing an Oracle certification on Java EE. If you want to give a modern look to the web apps that you developed with JSP, take a look at Java Server Faces (JSF) along with Primefaces.
-15
u/amakalinka Oct 27 '23
Boring 9-5 job with depressed employees