r/javahelp • u/[deleted] • Feb 12 '24
Is java fx worth learning?
Hey there, I'm an aspiring Java developer currently learning spring boot, as of now I have good command of OOPs and practice DSA in java.
I just wanted to know if learning to create GUI with java is worth it or not, because I've looked at it and doesn't really seem nice to code. . . . .
Thanks for the advice everyone.
11
u/meSmash101 Feb 12 '24
Only if you want to. I wouldn’t though. I would choose a million times to invest my time learning html-css-js then something like react, than to invest in Java fx. Time is money, java ui is quite rare in the job market. Better learn something that could take you a step further, career wise.
1
Feb 12 '24
Yep, that's what I am aiming at. I know the basic HTML/CSS. After learning the basics of spring boot I'll hop onto web dev a bit and learn react.
2
u/evils_twin Feb 13 '24
definitely learn react over java fx if you want to help your career later on. javascript frameworks are very popular now, so learning one of them would be useful
4
Feb 13 '24
For a Java dev, I'd learn Spring UI and Spring Boot web backend first. Get WindowBuilder for Spring. Makes it a breeze to drag and drop.
I use JavaFX a lot because I went through the pains of dealing with it. I really wish Swing would look better lol because I do miss its simplicity. Getting JavaFX to run smoothly is still a pain everything. It does run and look pretty nice. It can operate on android with Gluon decently too.
Career wise, I'd probably learn React/JS framework. As much as I HATE it, everything seems to be going to a webpage. I've even just used a JavaFX WebView to show my React project before. Tying the two together isn't THAT complicated.
WebAssembly is getting bigger and bigger though. We even have Java being ran in the browser unofficially. So I'd learn Boot for sure. Because I don't see it going anywhere.
2
Feb 13 '24
Gotta learn react js it seems
2
Feb 13 '24
I just did recently. After getting the whole thing setup via NPM, it was honestly not bad. Breaking everything down into functions like that helped me organize the site a lot.
I don't use ReactTS, just ReactJS. But the .jsx files are very nice transition from a traditional language.
2
Feb 12 '24
It depends what are your expectations with it.
If you want to learn it for the sake of it, go for it.
If you want to learn it because you want to work creating desktop apps with Java FX, I wouldn't bother, I don't see a big demand of that in the market right now.
1
Feb 12 '24
I'll avoid it then because I don't have much time to learn everything and it doesn't even interest me.
15
u/_jetrun Feb 12 '24
Only if you're interested. There isn't as much need to create *native* desktop frontend UIs these days, since most products out there are web-based, or mobile-based, or if for a desktop frontend are electron apps (i.e. use a web stack).
5
u/wildjokers Feb 12 '24
There isn't as much need to create native desktop frontend UIs these days
That is odd you say that, because looking at my desktop right now I have at least a dozen desktop apps open. Most written with a rich client GUI toolkit. Of the browser tabs I have open I have YouTube open and then several tabs of read-only informational sites (mostly related to taxes since I did those over the weekend).
I think desktop GUI apps written with non-web tech are still quite common i.e. written with GUI toolkits like Qt, wxWidgets, Swing, JavaFX, and whatever GUI toolkit windows uses (WinForms?)
3
u/_jetrun Feb 12 '24 edited Feb 12 '24
That is odd you say that, because looking at my desktop right now I have at least a dozen desktop apps open ... Of the browser tabs I have open I have YouTube open and then several tabs of read-only informational sites
Don't forget about reddit. And it isn't that odd - the number of web applications you interact with (on mobile and desktop) is probably several orders of magnitude larger than the number of native desktop applications you have installed. I know you say you *only* have several tabs, but I suspect if you open up your history you'll find that you visited quite a number of unique pages in the last, say, month.
The number of mobile apps you interact with is also probably much larger than the number of desktop applications you interact with.
Put another way, the number of jobs building web (or mobile) applications, is orders of magnitude higher than building native desktop applications.
But hey, outliers exist. I was making a general statement. There isn't as much native desktop development as there was, for example, in 2002.
1
u/sausageyoga2049 Feb 13 '24
I love these comments when their first reflections on Windows are some obsolete things that dated 20 years ago. Maybe that’s because Java-based GUI tools have stopped developing for last decade?
Even better when other comments step directly into the web citing that these heavy GUI clients are so dumb and soooo old fashioned.
Like GUI comes with sin that they are doomed to some ancient gargantuan.
3
2
u/amircruz Feb 13 '24
If you wanna go pro brother, try and go directly with Vue.JS, in the other hand, frameworks like Vaadin will give you a lot of nice perks.
If you already know Spring, probably Thymeleaf would be a good start. JavaFX, never heard of any requirement related to it since I have been working with Java (almost 15 years).
2
u/sausageyoga2049 Feb 13 '24
No it’s dead. If you really want to do GUI it would be better have a look on C# technologies like WinUI, Avalonia or WPF. Java is so infamous for GUI programming that most Java programmers would rather talk about React/Angular if they are not too old schooled with even more outdated Swing.
If you want to stick on JVM then have a look at compose multiplatform (Kotlin though).
2
u/notluckyy Feb 13 '24
Everything is worth learning if you see it on your Path. Dont mold your Path and wait for jobs that meet those requirements, aim to be the most t shaped as possible
2
u/flannelmonke Feb 13 '24
From what I’ve heard, if you wanna learn a GUI library/framework or whatever you wanna call it. JavaFX is kind of old and outdated. If you really wanna learn desktop applications go with something that’s already included in the Java SDK like awt or swing. However I do think other people in this thread have a point when they say web development has more opportunities than desktop apps. Again though if you wanna learn something don’t let that stop you. You can still make something impressive as a GUI app.
1
u/flannelmonke Feb 13 '24
Or you could look at C#. Apparently they have good frameworks, just less support for Linux environments. Or you could dishonour your name entirely and use Electron LMAO lord knows I have.
2
u/Appropriate-Size5233 Feb 16 '24
I was going to suggest Kotlin multi platform then your on a more modern language than Java and you can build desktop ui with compose or a native UI toolkit and have freedom to just do compose on Mac windows Linux and even iOS and android or use a native toolkit where it makes sense
This also gets you a leg into mobile app development without having to go full native or a web framework route like react native etc
Javafx I’ve never seen used by anyone. Swing we used back in 2010.
1
u/wildjokers Feb 12 '24
As far as job skills, positions that require/want Swing and JavaFX are few and far between (although they are out there). However, just for personal learning they are worth it. GUI toolkits are somewhat similar no matter which one you use, and knowledge of one helps with others. GUI development is also fun and knowing how to whip up a quick GUI interface can be handy.
Both Swing and JavaFX have a learning curve but it isn't too steep. Not nearly as steep as the backend ecosystem. For backend you have to learn a large part of these libraries/frameworks: Spring Core, Spring Boot, JDBC, Hibernate, Spring Data, JPA, Spring MVC, Servlet, JMS (or RabbitMQ), mysql/postgres/oracle, SQL etc. Not every place uses Spring so you might also have to learn JAX-RS, Micronaut, Quarkus, etc.
0
2
Feb 12 '24
[removed] — view removed comment
1
Feb 12 '24
I'm a student as of now, I don't even know if that'll even be required, I just like Java as a programming language that's why I chose it, but like the GUI stuff feels pretty weird to me so that's why I wanted to get some advice on it.
Will make sure to keep things in that order, thanks for the advice!
2
u/_jetrun Feb 12 '24
but like the GUI stuff feels pretty weird to me so that's why I wanted to get some advice on it.
Well - maybe that's a good reason to try it. You're a student, you're uncomfortable it - so this is a good time to give it a shot and get familiar with it to dissipate your discomfort.
•
u/AutoModerator Feb 12 '24
Please ensure that:
Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
You include any and all error messages in full
You ask clear questions
You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.
Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar
If any of the above points is not met, your post can and will be removed without further warning.
Code is to be formatted as code block (old reddit: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.
Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.
Code blocks look like this:
You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.
If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.
To potential helpers
Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.