by mschuster91 · 10y ago · 0 comments
Can anyone please tell me a reasonably complex GUI program in Java that is actually fast and resource-efficient? Counter-examples include IDEA, Lotus Notes, JDownloader, SAP...
I believe that while Java may be a nice programming language, you import slowness and resource starving of your system by using it.
* GTK and even Qt are criticized for looking non-native or even ugly, and for being limited in their available components.
* Going the Atom route, of embedding Chrome and writing your app in HTML and JavaScript, is daft. The languages are poorly suited for the domain, installer bundles are fat and bloated, and the results are so slow and sluggish that they make Java apps look like assembly in comparison.
* Writing native versions for each target platform multiples the development effort, and the number of issues.
Java isn't perfect (nothing is), but it really does stand up well against the likewise-imperfect alternatives. If you use modern JavaFX, or customize Swing as I believe JetBrains has done, then users really aren't even aware that they're running a Java application (you just admitted to being unaware that IntelliJ was written in Java). Nothing touches Java for ease of cross-platform development, and packaging and deployment is comparatively simple.
If your Java app performs sluggishly, then it probably isn't because of the UI anyway. You're seriously citing a huge IDE, Lotus Notes, and freaking SAP as benchmarks?
Write a web app and distribute said web app with browser runtimes. Either Chromium or Firefox. JavaScript might be a PITA, but you get a highly performant layout/UI engine, styling and portability for free.
Downside is that for stuff not supported in JS, like filesystem I/O or raw socket networking, you'll need either custom bindings or a NodeJS/PHP/... proxy service, but that's imho acceptable.
> If your Java app performs sluggishly, then it probably isn't because of the UI anyway. You're seriously citing a huge IDE, Lotus Notes, and freaking SAP as benchmarks?
These are widely used Java apps, developed by (in case of Notes and SAP) multi-billion dollar companies, and if even these massive resources cannot get speedy apps done, I might think it's the language/runtime environment at fault here.
The most prominent webapp-on-the-desktop example that I can think of is the Atom text editor. It runs like crap, and its installer is roughly 20 TIMES fatter than Notepad++ or Vim's. You could ship the Java-based "jEdit" application, along with a full embedded JVM, and still be 25% lighter.
And the desktop app is written in JavaScript.
If that sounds like a great idea, then there's really nothing else to talk about from here.
I've been writing Java for over 15 years and still don't want to write Android apps in any capacity.
It certainly has quirks and issues (as all languages do) but I'd say it'a as 'nice' (if not more so) as most popular languages.
Java certainly feels dated (I know it's trying to catch up).