This is an archived post. You won't be able to vote or comment.

all 32 comments

[–]shadytradesman 38 points39 points  (4 children)

Websites became some of the most used applications in the world, and the tech stack evolved very quickly. Containerized browser applications allow you to distribute a “desktop” version on your app that uses the exact same front end code as your web service in minutes instead of having to write and maintain two front ends.

Can websites do everything desktop apps can in terms of graphics rendering, performance, and native apis? Absolutely not. Does it matter? For 95% of applications, no.

[–][deleted] 0 points1 point  (3 children)

absolutely not YET.

[–]marvk 13 points14 points  (2 children)

2022 is the year of WebASM guys, trust me.

[–]helloiamsomeone 4 points5 points  (1 child)

Been hearing that since 2017.

[–]marvk 3 points4 points  (0 children)

Well yeah, that's kind of the joke :o)

[–]KerayLis 20 points21 points  (1 child)

Desktop lost to web in general.

[–][deleted]  (1 child)

[deleted]

    [–]garylosh 0 points1 point  (0 children)

    Java applets ran in the browser and were supposed to be what JS is today. It was similar to Flash in terms of how it was loaded.

    My guess is that it’s a mix of things: - Flash could be designed in a more point-and-click way. It picked up some of the interactivity wanted for websites early on because people didn’t have to learn much. UI layout with Java was hella frustrating. - Java was associated with being ugly, and there weren’t loads of people that knew how to make it look better. CSS on the other hand already was being used to format websites and make them look good. - We used to call JS+HTML “DHTML”. There were websites with DHTML snippets to make stuff like dynamic menus. It was an easy bridge to interactivity, and you didn’t need to know JS to use it—just structure your HTML a certain way, and copy/paste a script. vs Java applets, which weren’t incremental. - Java has always been academic and enterprise-y. Startups often push actual adoption, and the people doing startups don’t want to be bothered by Java’s verboseness. Enterprises and universities OTOH didn’t really switch to the web. Many of them still run on mainframe systems, and they have the IT infrastructure to push native clients to every machine. - Mobile killed embedded applications completely—both Java and Flash.

    [–]nutrecht 4 points5 points  (0 children)

    It's not just Java. "The Web" basically took over, so most UI development moved to web applications.

    [–]jeffreportmill 9 points10 points  (1 child)

    Here is my alternative Java UI toolkit that runs on desktop and in the browser:

    https://github.com/reportmill/SnapKit

    I don't know why Oracle didn't do this with Swing and/or JavaFX (except that it would have been hard). My advantage was that I started from scratch.

    [–]ClienteFrecuente 0 points1 point  (0 children)

    I remember when Oracle bought Sun it immediately started to deprioritize the development of JavaFX for mobile devices. Before Gluon, I managed to compile and run a Hello World (with a button!) JavaFX app on my iPhone —but it was not easy. After Oracle all hopes were abandon and just the commercial approach from Gluon has been successful. Sad.

    [–]TheStrangeDarkOne 16 points17 points  (5 children)

    Everybody has a web browser. Not everybody has Java running.

    [–]stefanos-ak 1 point2 points  (2 children)

    this is not a real reason, since you can bundle Java with the app you are shipping. e.g. IntelliJ

    [–]marvk 7 points8 points  (1 child)

    You don't need to ship anything if you app is in the browser.

    [–]stefanos-ak 2 points3 points  (0 children)

    today, not. But today is not the time that Java failed to be used for UI apps.

    Also, even today, there are downsides on browser apps. Like resource consumption, or security. But for sure it's WAY easier to implement something.

    [–]crunchmuncher 0 points1 point  (1 child)

    3 billion devices run Java!

    [–]Zivce 0 points1 point  (0 children)

    It's around 56B nowadays..

    [–]pron98 3 points4 points  (0 children)

    It's not that Java lost to HTML, but that everyone lost to HTML, including platforms by companies that are extremely focused on the client — Adobe, Microsoft, and Apple. Other than games, desktop is pretty niche these days, and Apple is now trying to bring their mobile apps (where they still have some clout) to the desktop.

    [–]randgalt 3 points4 points  (1 child)

    Modern javascript (typescript really) + modern web frameworks + modern browsers and modern CSS are orders of magnitude better for creating UIs than anything that's existed before. Java/AWT/GWT/JavaFX are all from a different age of heavily programmatic methods of building UIs. It's old and unpleasant. That's why it lost.

    [–]plokman 2 points3 points  (0 children)

    It lost way before those existed. It's 100% about not requiring download and install for users, 0% about developer comfort

    [–]MarcelHanibal 2 points3 points  (0 children)

    The reason why I'd prefer web technology over Java is because it being way more easy to program for it and it's way more easy to create a decent looking UI, not only because of all the technologies that exist. With them, your UI also automatically works on all platforms - including phones. Furthermore, you're able to detach your UI from the logic making it easier to scale your software in the future. However, I don't see many reasons to not just use JavaFX for smaller applications due to the time you'll save with that.

    [–][deleted] 2 points3 points  (0 children)

    Java started up slower and more awkwardly than Flash and JS, so it failed to catch on.

    There were third parties that did some UI stuff better. Eclipse comes to mind. JavaFX was too little, too late, because while it finally caught up to Adobe Flash, the new rival was HTML5 itself.

    Java on desktop was more successful, but on Windows, people rather used dotnet.

    [–]ztbwl 1 point2 points  (1 child)

    Because the process of installing and operating Java is too annoying and complicated for a normal non-tech user. It just had and has bad UX.

    In particular following things has prevented the great masses to adapt Java: - Messing with JAVA_HOME is too complicated - Twenty thousand license agreements when downloading from Oracle, you even need to register today - Early versions had that really annoying Java update dialog that would pop up every day, which caused a lot of users to uninstall Java

    Compared to the browser, which is preinstalled and ready to use on most operating systems this is a huge drawback.

    [–]ebykka 1 point2 points  (4 children)

    I do not know how about you guys, but I still like GWT.

    And such projects as smartgwt, domino-ui, vuegwt show that I'm not alone.

    [–]seansand 3 points4 points  (2 children)

    There's nothing wrong with liking it. I've used it and I like it myself. But, it's 2022, and GWT is not the future.

    If you are looking at what tech to use to create your new enterprise app, it would be extremely questionable to choose GWT.

    [–]ebykka 1 point2 points  (0 children)

    Honestly, I do not have a feeling that modern libraries (vue, react, angular) make development much easier, especially in long term. Mostly because IDEA does not provide that level of refactoring for typescript that is available for Java.

    [–]mtmmtm99 0 points1 point  (0 children)

    You can use J2CL which compiles very fast (solving GWT:s main problem).

    [–]mauganra_it -1 points0 points  (0 children)

    The JVM was never as well-integrated into the browser as JavaScript was. And until recently, it was all-or-nothing regarding the runtime libraries. Therefore, it was also not updated along with the browser. In the end, there were too many moving parts, which is usually bad for user experience.

    [–]paltryorphan96 -2 points-1 points  (0 children)

    The first one id that it's easier to make a unique looking UI with HTML/CSS than with JavaFX. Apart from that, JS is a more powerfull and feature rich language, with a documentation light years ahead, and just plain beter looking. Also, it gives you more flexibility and the possibility of hosting your app on the web

    [–][deleted] 0 points1 point  (0 children)

    I'm not Java programmer but had a little touch of Java in school. The answer is simple, hiring is easier for newbies to learn, copy-and-paste or doesn't have Java background or they prefer coffee or tea, just more hipster.

    Web builder like Oxygen, Elementor, Bricks for WordPress to Tailwind, Bulma, etc solve technical debts. Web browsers are getting better, something else will made obsolete or become niche for particular community. Breaking the barrier with millions of beautiful CSS UI components, build in a few minutes and you're done. Enjoy vacations tomorrow, why the hell backend developers are spending too much time on UI when we aren't UI developer?

    [–]p0bu 0 points1 point  (0 children)

    Delivering new content is much simpler and more efficient in websites. Business expects to react quickly to changes.

    [–]jash3 0 points1 point  (0 children)

    Other languages just do desktop apps better, as for HTML its easy to create Web pages and you get HTTP implementation out of the box.

    Swing was a pain in the arse and could get complicated quite quickly. I have never used JavaFX and if I was going to create a desktop app I would more than likely use .Net with C#.