UI really can't be moved entirely to the backend.
Web browser as GUI, with your preferred language in the backend
141–150 of 187 posts
Re: Web browser as GUI, with your preferred language in the backend
#142Re: Web browser as GUI, with your preferred language in the backend
#143What am I missing here? Web browsers are already GUIs, and any backend with an api supports it.
Re: Web browser as GUI, with your preferred language in the backend
#144I did a basic C demo where I compared this to Tauri/webview: https://github.com/petabyt/webui-demo I'm not planning to make any apps in HTML/CSS, but if I had to, WebUI would be my choice.
Re: Web browser as GUI, with your preferred language in the backend
#145If I understand correctly, it's WebSocket on top of Embedded C/C++ web server (civetweb). Also, the application must find and launch the installed browser. In my opinion, this part is very fragile. On my system, this function (webui/src/webui.c) : static bool _webui_browser_exist(_webui_window_t * win, size_t browser); cannot find my browser.
civetweb will run cross platform as a http server. the issue is when you need write code on each OS, e.g. a cgi for windows/macos/linux/bsd, you will have to know the native API for each OS and use them, which could be hard to maintain if cross-platform is a must. I wish there is something lower level that is truly cross platform, e.g. a C library runs on each OS and let me do filesystem/network/etc, it does not seem…
Uh, stdlib and friends? No?
Re: Web browser as GUI, with your preferred language in the backend
#146Earlier quoted context omitted.
> You have to specify a fixed resolution, fixed size, and more often than not calculate the layout yourself, or use very limited auto-layout features. Even Java UIs supported dynamic layouts 20 years ago. C# had a flex box based layout (called flow layout) since 2006.
Worse developer experience and worse style options though
Re: Web browser as GUI, with your preferred language in the backend
#147Earlier quoted context omitted.
> You have to specify a fixed resolution, fixed size, and more often than not calculate the layout yourself, or use very limited auto-layout features. Even Java UIs supported dynamic layouts 20 years ago. C# had a flex box based layout (called flow layout) since 2006.
Worse developer experience and worse style options though
At this point in time I'd been writing react for 2 years non stop and I hadn't used winforms for at least 5 years.
I started up visual studio, and used the GUI builder to make a fully featured data bound winforms app connected to my backend in less than a day.
2 months later I had the react version up and running.
Was the react version shinier?
Yes.
But the web development experience is literally orders of magnitude worse.
Re: Web browser as GUI, with your preferred language in the backend
#148I'm seeing lots of comparisons to Tauri, which is exciting because while I am using Tauri to build an app, I'm not actually that enthusiastic about Rust. But I'm feeling a lot of comparisons are really just comparing the most straight forward, load HTML + JS in a webview, without comparing other things like: - (Auto) Updating. - Embedding other files (and actually distribute them). - Plugins (I guess plugins can be m…
Re: Web browser as GUI, with your preferred language in the backend
#149Earlier quoted context omitted.
> 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…
This is serious? Generally your app should aspire to having a better user experience than a low end phishing scam. Normal people really don't want to copy/paste a series of random looking computery numbers from one application into their web browser. At best it feels broken and more likely it feels like you are about to get hacked.
Re: Web browser as GUI, with your preferred language in the backend
#150If I understand correctly, it's WebSocket on top of Embedded C/C++ web server (civetweb). Also, the application must find and launch the installed browser. In my opinion, this part is very fragile. On my system, this function (webui/src/webui.c) : static bool _webui_browser_exist(_webui_window_t * win, size_t browser); cannot find my browser.
In graderjs i solve this by searching for the installed browser, and then prompting the user to download it —obviously just the first time! — if we couldn’t find it. so the download and install happens as part of the application start up process and it’s baked into the framework. I think it’s a nice solution where the application installs any components that might need.
I think another nice solution would be to use playwright because that usually downloads all browsers that you might want and I’m sure that can be customized. playwright is a reliable source and it’ll put them in a location that easy to find.