Live data from Hacker News

Web browser as GUI, with your preferred language in the backend

github.com

151–160 of 187 posts

Re: Web browser as GUI, with your preferred language in the backend

#151
I don't understand how this is materially better than Tauri (more generally, frameworks that bind to the platform webview).

At least with the platform webview, you can:

1. Have some knowledge about what engine versions were available on what OS versions and make compatibility decisions accordingly.

2. Know that the browser engine is always there.

When it comes to trade-offs between "static linking" (Electron) and "dynamic linking" (Tauri), this is like cowboy linking. You have literally no idea what browser will open. I guess this isn't materially different from a remotely hosted backend but I still wonder of the merits.

And why communicate over a websocket, or not have a custom protocol that you can handle and register with the OS more easily? I like the general idea but this seems inferior to a webview in almost every way.

I do see how you might get things like extensions easier, but I'd rather petition the platforms to add extension support and close other gaps directly in their webview runtimes.

And is it just localhost under the hood? If so it reminds me of this Zoom security debacle a few years ago:

https://archive.ph/3fxFS

Re: Web browser as GUI, with your preferred language in the backend

#152
Wow, couple with WasmGC this cross-platform GUI approach can be the way to go for cloud enabled local-first application [1][2].

Personally will love to see D language supporting these two features since the fact that D has GC by default and still does not has a polished cross-platform GUI framework.

[1] WasmGC – Run GC languages such as Kotlin, Java in Chrome browser

https://news.ycombinator.com/item?id=38109020

[2] WebAssembly Garbage Collection (WasmGC) now enabled by default in Chrome

https://developer.chrome.com/blog/wasmgc/

Re: Web browser as GUI, with your preferred language in the backend

#153

I wish that Apple and Microsoft would work together towards making it easier for people to make cross platform desktop applications. It's largely uneconomical for most companies to develop and maintain separate apps using two different teams with minimally interchangeable skills. Tools like Electron are, essentially, not a choice I also wish that wasm would come sooner so we could have more memory and CPU efficient (…

We have good cross-platform desktop UI solutions: Java Swing/JavaFX, C++ GTK/Qt/wxWidgets, Rust egui/iced/Slint, and of course HTML/CSS/JS Electron/Sciter. The problem is that cross-platform UI will never look as well as native UI because it’s not native UI: control sizes are different, colors and elements don’t blend the same way, and some things (like menu bars) are completely different in mac, Windows, and Linux.…

This! I hate when an app's GUI is following Windows-principles (if at all) and the macOS version is basically the same with a macOS theme slapped on top of it.

About 10 years ago I've experimented with an early version of appcelerator Titanium for mobile app development. It was JavaScript but GUI rendering was transcoded to either Android-Java or Apple-ObjectiveC and the respective code was compiled natively (while running your main code via a JavaScript engine). With a bit of if-then-else you could make one app that compiled for both platforms and looked and felt native on both.

Re: Web browser as GUI, with your preferred language in the backend

#155
Reminds me of the approach of CLOG (Common Lisp Omnificent Gui[1]) and its ancestor GNOGA (The GNU Omnificent GUI for Ada[2]).

They also integrate basic components and even graphical UI editor (at least for CLOG), so you can essentially develop the whole thing from inside CL or Ada

[1] https://github.com/rabbibotton/clog

[2] https://github.com/alire-project/gnoga

Re: Web browser as GUI, with your preferred language in the backend

#156
post #146
post #125

Earlier quoted context omitted.

Worse developer experience and worse style options though

Better user experience and many styling options are counterproductive for the UX.

Better user experience (UX) is counterproductive for the UX... wut

Re: Web browser as GUI, with your preferred language in the backend

#158
post #81
post #19

Earlier quoted context omitted.

SABnzbd agrees since 2016.

Hmmm I thought it ran its own web server instead.

Ah okay I didn't know that you could avoid that. "Think of WebUI like a WebView controller" the README says.

Re: Web browser as GUI, with your preferred language in the backend

#159

I wish that Apple and Microsoft would work together towards making it easier for people to make cross platform desktop applications. It's largely uneconomical for most companies to develop and maintain separate apps using two different teams with minimally interchangeable skills. Tools like Electron are, essentially, not a choice I also wish that wasm would come sooner so we could have more memory and CPU efficient (…

We have good cross-platform desktop UI solutions: Java Swing/JavaFX, C++ GTK/Qt/wxWidgets, Rust egui/iced/Slint, and of course HTML/CSS/JS Electron/Sciter. The problem is that cross-platform UI will never look as well as native UI because it’s not native UI: control sizes are different, colors and elements don’t blend the same way, and some things (like menu bars) are completely different in mac, Windows, and Linux.…

If that were the problem, then Electron wouldn't help in any way either. In fact, Electron is even less interested in platform conventions than something like Swing. There isn't even default styling that tries to copy MacOS/Windows that you can apply.

The bigger problem is actually desktop-mobile compatibility today. No one writes apps only for Windows and MacOS. You want an app that works on iOS, Android, Windows and MacOS, and typically on the web as well so people can occasionally access it from an unfamiliar computer. So, the only viable option unless you want to have 4 dedicated UI teams or so is to write it in the lowest common denominator of HTML/CSS/JS, and use Electron and WebView to distribute it.

To a very good approximation, no one whatsoever cares about platform look and feel. In fact, most people actively prefer if they're using an app for it to have the same look and feel across all systems where they use it, including the web.

Re: Web browser as GUI, with your preferred language in the backend

#160
post #100

I wish that Apple and Microsoft would work together towards making it easier for people to make cross platform desktop applications. It's largely uneconomical for most companies to develop and maintain separate apps using two different teams with minimally interchangeable skills. Tools like Electron are, essentially, not a choice I also wish that wasm would come sooner so we could have more memory and CPU efficient (…

> Tools like Electron are, essentially, not a choice yeah, they really are. people seem to forget that you can simply start a local web server, and direct the user to visit http://localhost:8080 . here is one in Go, literally 8 lines of code: package main import "net/http" func main() { http.HandleFunc("/", func(w http.ResponseWriter, _ *http.Request) { w.Write([]byte("hello world")) }) http.ListenAndServe(":8080", n…

Wow thanks, I really needed to see a hello world server example
Post reply on HN