News for hackers. Stuff that matters.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by johntdaly on Thursday March 24, 2022 @10:31AM (#30790325)
I never “got” electron. My work is building webapps and I don’t see why anyone would want to use HTML and JavaScript to develop a significant desktop app with modern UI.

I can only assume web technologies and electron got popular because all of the Desktop platforms where trying to jump to tablets and phones and whatever else they considered new and shiny so that while web tech was a terrible stack it was at least stable.

P.S.: I sort of hope for Griffon to make a come back. Griffon framework + Groovy + JavaFX looked nice to me.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by toyg on Thursday March 24, 2022 @10:44AM (#30790573)
> while web tech was a terrible stack it was at least stable.

No no no. Web tech was/is terrible, but it's dirt cheap. You can hire JS hacks by the boatload, and retrofit whatever they build into an electron app relatively easily. Whereas desktop developers are few and expensive, and they tend to optimise for this or that platform or toolkit.

Electron didn't win on quality or features - it won on the back of commercial realities of the development world.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by KptMarchewa on Thursday March 24, 2022 @10:47AM (#30790628)
I don't think 'desktop' devs are any more expensive or cheaper. There's definitely way less of them and majority of people who know stuff like Win32 APIs are either very specialized or working on games.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by toyg on Thursday March 24, 2022 @09:12PM (#30797650)
Basic supply and demand dictates than, being fewer, they would command higher prices. Which they did, until JS ate the world.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by numpad0 on Thursday March 24, 2022 @11:40AM (#30791428)
Can’t set up a sweatshop as a school and have students pay to work on Win32 apps.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by KptMarchewa on Friday March 25, 2022 @06:44AM (#30800524)
That's what a lot of companies did 10-15 years ago in Poland. Sometimes it was Delphi. Of course, the applications were shitty, but also a lot of web is shitty.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by quatrevingts on Thursday March 24, 2022 @12:12PM (#30791890)
As a layout and rendering toolkit, the modern web browser is just head and shoulders above everything else in terms of features and ease of use.

As problematic as CSS is, getting things in the right place is still dramatically easier than with Swing LayoutManagers, and when you do have problems, you have great tools in the browser to explain what's going on.

Browsers particularly shine in text rendering, naturally; text styling, font selection, word wrapping, etc. are all easily configurable. You want bold text next to regular text in Swing? You either need two JLabels, or you wrap your text in <html> tags and let the embedded HTML 3.2 renderer do it.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by kaba0 on Friday March 25, 2022 @07:45AM (#30800922)
Whaaat, no way. Sure, Swing is not the epitome of a framework, but the web was famously terrible before flexbox, and it is still not as advanced as something like Apple’s constraints based layouting system.

Also, word wrapping? HTML is quite terrible to read compared to Latex-rendered text so I wouldn’t say that it is all that good in fonts either.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by mike_hearn on Thursday March 24, 2022 @12:33PM (#30792181)
Swing isn't exactly the latest toolkit though, is it?

JavaFX has much more intuitive layout for apps than HTML and also has CSS. So you can get the best of all worlds. HTML5 has been trying to catch up with CSS flex-box, but it's all just retrofitted and shows.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by kizer on Thursday March 24, 2022 @10:52AM (#30790696)
Well, there are a number of “selling points” to electron/NW.JS or similar: reuse JS code/skills/libraries (npm) to build desktop apps; use Node.JS to build desktop apps; cross-platform. It clearly lowered the barrier and from a company’s perspective front-end talent’s “reach” is expanded.

Even way before they came out I wondered why more native apps didn’t just reuse HTML/CSS at least (many did).

Of course we all know of the downsides of Electron (basically Chromium + An App in every app; ridiculously heavy-weight.

I’m fond of the webview project and Tauri, being built on top of it. It reuses the available system browser view and doesn’t bundle Node, so it’s very light.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by Octoth0rpe on Thursday March 24, 2022 @03:17PM (#30794201)
> It reuses the available system browser view and doesn’t bundle Node, so it’s very light.

It's 'light' in terms of download size, it's not far off from Electron in terms of resource usage. Most complaints about Electron are about resource usage, not really download size (though there are some).

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by kizer on Thursday March 24, 2022 @08:14PM (#30797256)
Very good point.