The decline and fall of Java on the desktop
211–220 of 362 posts
Re: The decline and fall of Java on the desktop
#212Nice to see that Java works pretty well for indie games these days -it's a more pleasant language & ecosystem to work with than C++, and you don't need to deal with Unity's bullshit. Slay The Spire and Mindustry were written in it.
Re: The decline and fall of Java on the desktop
#213Earlier quoted context omitted.
"Swing suffered from two central weaknesses: the tutorials provided by Oracle were... often insufficient. And you could pick up some bad habits by following them. And then there were the UI builders where anybody could draw up something mediocre." Agreed. Also, the IDEs would typically give you too much rope - enough for a novice to hang himself. When you create a new project with Xcode, you get a default project wit…
Oh, yes, the details are critical. Once inherited a 2D graphic editor... so slow it was totally useless. After tinkering a bit I noticed coordinates were sometimes 'long', sometimes 'Long'... gazillions of automatic boxing and unboxing operations resulted in a severe performance penalty. But the original developer didn't figure this out, tried to fix the problem by adding some multithreading on top... and of course b…
Is swing still developed and is there any reason I should pick JavaFX over Swing?
Re: The decline and fall of Java on the desktop
#214Contrast with the web deployment model:
* Deploy with a free SSL certificate
* Click Once, Run Anywhere (CORA)
Luckily for Java fans, you can make great Java apps for the modern web. Tools like TeaVM (and its Flavour toolkit for SPAs) make it possible. Code in Java, bind to real HTML templates, compose your app out of reusable HTML components, style with CSS. All the benefits of the modern web, with a single strongly-typed language top-to-bottom.
* TeaVM: https://teavm.org
* Real 5-letter word app made with TeaVM/Flavour: https://frequal.com/wordii/
* Migration Guide from Swing to TeaVM: https://frequal.com/TeaVM/migration/MigratingFromSwingToTeaV...
* Java Magazine article on TeaVM: https://blogs.oracle.com/javamagazine/post/java-in-the-brows...
Re: The decline and fall of Java on the desktop
#215Earlier quoted context omitted.
That's not the fault of the language, though I'd say maybe Kotlin is a considerably better choice nowadays. If by blockly you mean the visual interface, what you said is going to be true for any language. If by blockly you mean javascript, maybe, but honestly if it's an exercise to build foundations (and not just for personal gratification), javascript (or python) isn't much easier for kids than Java, because it has…
> And if there's any fault in the language chosen for AP computer science, the blame should go to the designer of the curriculum. Java was recommended for AP CS 22 years ago. At this point I lay less fault at their feet and I'm more interested in why it's still there at long last. > If by blockly you mean the visual interface, what you said is going to be true for any language. My research isn't published yet but I'v…
Matlab is really not a good example imo because if you start wanting to do a bit more, even if it's just to organize the code in better logical blocks, it bad design and lack of OOP gets in the way and makes further progress slower especially for the more talented students.
And finally, while I agree Java might not be the most optimal to teach at the AP level, what you said isn't worth bashing the language for in general terms. It's still sqaurely the AP curriculum's fault that it chooses Java and at the same time requires it to be taught in a way that's not fun or efficient, and not have updated it in 2 decades (while Java had many iterations)
Re: The decline and fall of Java on the desktop
#216Successfully using JavaFX (or OpenJFX as it is now called) in a mission-critical cross-platform app with 50k+ installs. It’s not that bad really. Package size and RAM usage is a bit of an issue, as we bundle it with a jlink’ed (stripped down to what is needed, thanks to Java 9 modules) JDK. Other options like Electron or native Windows/macOS wrappers around a shared core written in C++ were discussed but ultimately d…
Question is can JavaFx be recommended for a new project, given the uncertainty of its future and lack of popularity.
Re: The decline and fall of Java on the desktop
#217These days web is the new cross platform technology. It works everywhere. And mobile is where people focus for native apps. Windows is an afterthought at best. Mac even more. And Linux oddly is now a main source of open source applications that also work on windows and mac. But it's not a big market.
Unless you consider Android a linux distribution. In that case it's absolutely huge. And Java/Kotlin are the languages of choice on that platform. But they are compiled to native ahead of time so don't require a JVM.
Otherwise, Applet support for browsers died a long time ago so that blocked Java from being useful on the web. The JVM as distributed by Oracle (and other openjdk packagers) only really covers the traditional three desktop platforms. And it's not really native there and kind of heavy weight. That limits the appeal. Java is not really that cross platform anymore. Sun failed to anticipate and survive the move to smartphones. Up until then J2ME was a thing. These days almost no phone comes with Java support. That's the real reason Java usage on the desktop declined. It did not cover new platforms from about 2007 onwards.
Despite this there's a new JVM framework on the block: compose desktop. It uses skia (like flutter) and there's a mobile variant supported by Google called jetpack compose. And a web variant called compose web. IOS support is missing. But that looks like it might be addressed at some point.
Re: The decline and fall of Java on the desktop
#218Earlier quoted context omitted.
Oh, yes, the details are critical. Once inherited a 2D graphic editor... so slow it was totally useless. After tinkering a bit I noticed coordinates were sometimes 'long', sometimes 'Long'... gazillions of automatic boxing and unboxing operations resulted in a severe performance penalty. But the original developer didn't figure this out, tried to fix the problem by adding some multithreading on top... and of course b…
I played with Swing a bit and really liked the control it provides. Is there any book that you recommend other than Filthy Rich Clients by Chet Haase to develop complex Swing application or to pick up good habits? Is swing still developed and is there any reason I should pick JavaFX over Swing?
Re: The decline and fall of Java on the desktop
#219My desktop text editor[1] is written using JavaFX and leans on Warp Packer[2] to create installer-free, multi-platform executable binaries (without jlink). A user contributed a new dark theme[3], which blends nicely with the desktop. The JavaFX-based WebView (an HTML rendering component) is lauded, but has no direct API to control the scroll position and is itself a memory hog. Scrolling must be handled through JavaS…