Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is it really so hard to write a native GUI for three OSes if you must?


Indeed. It's very hard. Besides Qt, what other toolkits are available that go beyond basic UI and offer complex widgets like grids and stuff?


There are at least GTK+, JavaFX, Swing and wxwidgets.


Do they have complex widgets like grids and stuff? I have worked with wxWidgets for a while and for anything besides basic fields you had to put in a lot of work and code from scratch. I can definitely see the appeal of Electron and reusing web apps and frameworks.

Makes we wonder if Electron apps really have to suck up that much memory. Could the framework be tuned to use less?


> Do they have complex widgets like grids and stuff?

Yes, they all have complex widgets like grids and stuff. Grids being layout managers, not widgets.


I guess I meant grid as in data grid to show data from a database, not layout. With wxWidgets it got tedious once you needed sorting, filtering or paging.

On the web I have a lot of choice, also in .NET. Not so much in qt or wxwidgets. I have seen some very nice Java desktop apps recently so maybe that's a good choice now despite a not so good reputation.


What do you mean with you don't have much choice with Qt? Its view-model architecture lets you basically use any source of data you like in the backend.


I am talking about UI widgets like grids with sorting, grouping, filtering, resizable headers or diagrams, charts, gauges and other stuff. On the web and in .NET you have dozens of choices that look very good whereas on qt I haven't seen much third party support.


Can you post a screenshot of such a "grid" widget? Because in Qt a grid just refers to a layout where you can place arbitrary widgets.



Qt has a built in table widget [1], which although it's very powerful, doesn't come with that many features out of the box. And neither does .NET (or HTML), because what you linked is a 3rd party component which costs a lot of money. Not sure where you could buy something like that for Qt though.

1. http://doc.qt.io/qt-5/qtablewidget.html


"costs a lot of money"

It's super cheap when you have to get something done quickly. The functionality you get is insane.

I have looked around for qt but there wasn't much. And what I found didn't look very good.


> Is it really so hard to write a native GUI for three OSes if you must?

Yes. What makes you think otherwise?


I think this is often the perception - and I understand why, because I shared it for a very long time - but I don’t think it’s true.

Building a simple UI for multiple platforms may be somewhat more time consuming than a single cross-platform Electron implementation. This will scale with the complexity of the UI.

This particular application has about the simplest UI imaginable. Consume some keystrokes, render some rows of text. Implementing this is any native UI platform will not be hard - but it will reduce the memory footprint, rendering time, and application bundle size.

Native UI frameworks are actually really good at rendering simple applications on their platforms. There’s usually plenty of documentation and good development tools. Building an application using one of them is definitely different from web tech - but I don’t think it qualifies as hard. And I reckon it would be useful for more of us to experience as many different platforms as possible - it’s a great way to learn!


The native platforms backed by real money also have lots of official documentation, real GUI builders, high quality debuggers built into their IDE’s and one cardinal way/library to do something. The importance of all this stuff in speeding up things can’t be overstated.


Experience? I would much rather have the freedom, and reliability of a native platform than to deal with HTML’s limitations, poor performance, and having to worry about the „optimal rendering path” that’s basically black magick you have little control over.

HTML breaks in ways you won’t predict. Some things you’ll have to hack together so hard you’ll want to take a shower afterward. And it’s only a matter of time untill that piles up enough to justify using native UI from the start.


> Experience? [...]

> And it’s only a matter of time untill that piles up enough to justify using native UI from the start.

That's a little hyperbolic and counter to my experience.


The application we are talking about literally is nothing more than a text entry and a list of styled text labels to display the results.


GPP asked a general question, they weren't referring to the UI in the article.




How is that a “real repo” and mine aren’t? The article this thread is about is written in Rust for the majority of the app. I linked to three cross-platform UI bindings/libraries for Rust that could’ve fairly quickly provided the same UI that the Electron portion provided. I get it some prefer Electron and that’s ok, but to say that cross-platform coding is inherently difficult otherwise is a bit of a stretch to me.


[deleted]


No you're not. These are cross-platform. Save for a few OS-specific things (not UI related, which would have been a problem with electron ayway), it's just about compiling it on a new OS to get it working.


Probably not, but it's three times the work. Do you want to spend effort in maintaining or developing?


or 2 OSes if 98% of the potential desktop / laptop market will suffice and your product is not aimed at developers.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: