7 ms·
Honestly, writing a cross platform gui is a waste of time. Java tried it(multiple times) and failed. Electron tried it and the results are terrible. Qt is moder
by quantummkv 7y ago
Honestly, writing a cross platform gui is a waste of time. Java tried it(multiple times) and failed. Electron tried it and the results are terrible. Qt is moderately successful at it mostly because it is treated as the system toolkit on a lot of Linux platforms and Windows users are conditioned not to care about consistency and experience because of bad enterprise CRUD apps and Microsoft's own inconsistent behavior.
What rust should do is focus more on interop with other languages. Write your critical business logic in Rust and make that cross platform. Then write GUI in the platforms preferred Library/Language combo that handles all the UI and makes calls to a cross platform rust binary for grunt business logic processing.
- hombre_fatal 7y ago> Electron tried it and the results are terrible. I use VSCode, Slack, and Discord every day (and some other Electron apps). The results are great and better than anything I've seen in the xplat space where there are always trade-offs.
- 0_gravitas 7y agoi think that is part of GP's point, if Electron is the best we can do, then thats not a great sign. im a regular discord user and used to heavily use VSC, but i had to abandon it, for my uses it was far too heavy for what it was.
- Razengan 7y agoThere are definitely trade-offs with Electron. Higher CPU, RAM and battery usage compared to native apps, and on macOS at least, the loss of features which native controls get for free.
- quantummkv 7y agoIs Electron better than most cross platform alternatives? Yes. Is Electron better than platform's native tooklit? No. Electron apps are easily recognizable because they completely stand out from the platform apps (not in a good way). And there are other concerns that are addressed in the numerous electron threads on HN so I won't list them here.
- deleted 7y ago[deleted]
- tiew9Vii 7y agoI recently looked at JavaFX not expecting much. It's come a long way from the Swing days and I think the biggest issue is it's perceived history, Java / Swing being slow and ugly. The other issues is the lack of marketing of what modern JavaFX can do. So I wouldn't call it a failure, it's plodded on in the background improving slowly over time, where it has failed is on market adoption.
- bpye 7y agoI feel that Electron is bad not because you're running the same UI everywhere but rather because you're running an entire web browser.
- simion314 7y agoWeb technology is designed for documents and making non toy apps is a pain, if I may give you a few examples of issues I hit this week: - I wanted to create a grid of img like elements(something a bit more complex where you have some small buttons on each image), I hit the issue that the browser would take like 2 seconds to load 1000 elements, in a decent GUI toolit this is not a problem, as an example in Flex4 I can have a list with 1000 elements, if only 10 elements are visible then the toolkit creates say 16 GUI elements, as you scroll the elements that get out of view are recycled , in Web you either create all 1000 GUI elements(that each element is maybe formed with a giant div soup) or you use a infinte scrolling like pattern, check Youtube as an example, go to a specific channel video list, you see only 2- 3 rows of videos, then you scroll and wait for next few rows, scroll and wait again, scroll and wait again ...tldr web GUI performance is really bad - native components are limited, you can't css properly and consistently a numeric input(you can't css the colors of arrows to fit your styles) , you can't have a dropdown that contains icons or some more complex thing like a "Font Families dropdown" , you can't customize the dropdown scrollbar colors so you are forced (is not my fault that desingers want shit to match in theme and not have white crap on a dark theme) to find or create custom components, so you get to import JS libraries and most of the time this components are broken, Ex check the youtube search dropdown, it happened a few time for me to get the dropdown in the search to get stuck open, only way to fix it is to reload the page, Google devs can't properly implement a correct dropdown widget. In PayPal their custom input widget to enter money does not support the "Del" key . In a decent widget toolkit you extend the existing widget, you get all the existing functionality and you add your custom features on top in Web you start with DIVs and CSS do a mediocre job and then fix the issues that get reported if you have the time. All this issues are solved in Qt, Flex or WPF, the components are performant, you can customize without losing basic features, you don't have to research shit like "what library should I use Monday to implement the numeric spinner input" .
- 7y ago
- ClumsyPilot 7y agoThere have been a few great product delivered on Java, such as IntelliJ. Visual consistency with the underlying OS is an overblown concern. The application needs to be well-designed and performant.