News for hackers. Stuff that matters.
Re:Wails: Build cross-platform applications using Go by howeyc on Saturday July 16, 2022 @02:35PM (#32120651)
I don't get these projects. If you're going to write an html/js app, why not just launch the web browser against the local url of your app?
Re:Wails: Build cross-platform applications using Go by solardev on Saturday July 16, 2022 @04:38PM (#32121743)
An embedded webview gives you more control over the browser chrome (as in UI), extensions, cookies, etc. It also gives you a shim into some filesystem/OS APIs that a regular sandboxed browser page wouldn't have. It gives you a predictable HTML/JS renderer that you control, instead of blindly hoping that your user will happen to have a compatible browser.

Still, webview UIs are a lazy alternative to actual native apps. I don't like them either, but not every org can afford to hire native devs and write 3x-4x the UI code.

Re:Wails: Build cross-platform applications using Go by giantrobot on Saturday July 16, 2022 @06:06PM (#32122386)
> It also gives you a shim into some filesystem/OS APIs that a regular sandboxed browser page wouldn't have.

If you're just talking to a localhost server, it's got all the local access it needs. The web UI doesn't have to do anything besides control the native service running. I'd much rather be able to ship a tiny binary and use the local browser than pack around a whole browser just to access otherwise restricted/sandboxed APIs. You can just drop a URL shortcut on the desktop (or wherever) during installation.

Re:Wails: Build cross-platform applications using Go by mmgutz on Saturday July 16, 2022 @07:11PM (#32122796)
Wails DOES NOT ship with a browser. It's not electron.
Re:Wails: Build cross-platform applications using Go by psydvl on Saturday July 16, 2022 @07:17PM (#32122828)
It required webkit, almost same shit
Re:Wails: Build cross-platform applications using Go by 0x20cowboy on Saturday July 16, 2022 @03:54PM (#32121372)
Using the the apps I have built in this style as an example (not this library in particular though) - starting a whole browser comes with a lot of baggage you may not need - plug-ins as a small example. It’s easier to target 3 OSs than some random permutation.

Also, doing it this way, you can extend the Javascript to add custom callback functions - if that is something you need.

Also, it’s all in one process so there is less fiddly bits (request / response and all that)

You do bring up a good point though, and I hadn’t thought of the PWA angle. It would be an easy way to add a cli interface (just curl I guess)… I might try that next time.

Re:Wails: Build cross-platform applications using Go by dewey on Saturday July 16, 2022 @02:53PM (#32120817)
Because you might ship this to users and just having an app for them to click on and open is a lot more user friendly than telling people to type in some localhost URL or open browser tabs with "cryptic" urls.
Re:Wails: Build cross-platform applications using Go by pjmlp on Saturday July 16, 2022 @02:58PM (#32120873)
Just have the application start the browser like daemons used to 20 years ago.

Nowadays they can even send the PWA manifest to hide the browser appearance.

Re:Wails: Build cross-platform applications using Go by dewey on Saturday July 16, 2022 @03:01PM (#32120900)
Are we really arguing why someone might want to have a "native" app instead of a browser window? There's many reasons why someone might want to have that.
Re:Wails: Build cross-platform applications using Go by pjmlp on Saturday July 16, 2022 @03:32PM (#32121168)
Yes we are, Web technologies belong in the browser.

I wasn't impressed with MSHTML when it came up as Active Desktop, nor I am impressed with anything that followed suit.

Re:Wails: Build cross-platform applications using Go by dewey on Saturday July 16, 2022 @03:37PM (#32121206)
> Web technologies belong in the browser

That ship has sailed a long time ago. These days sometimes whole operating systems are based on HTML based interfaces (LGs TV OS would be one example).

Re:Wails: Build cross-platform applications using Go by pjmlp on Saturday July 16, 2022 @04:23PM (#32121614)
WebOS applications don't ship a browser alongside them, they use what is already installed.

Doing Web development alongside native since Web exists, hasn't made me like shipping browsers with applications (or Web views) any better during the last 20 years.

Re:Wails: Build cross-platform applications using Go by solardev on Saturday July 16, 2022 @04:55PM (#32121882)
This framework does this same thing:

> It does not embed a browser, so it is resource efficient. Instead, it uses the native rendering engine for the platform. On Windows, this is the new Microsoft Webview2 library, built on Chromium.

https://wails.io/docs/introduction#native-elements

Re:Wails: Build cross-platform applications using Go by pjmlp on Saturday July 16, 2022 @05:09PM (#32122001)
You missed my remark between parenthesis.
Re:Wails: Build cross-platform applications using Go by solardev on Saturday July 16, 2022 @05:13PM (#32122038)
Not really sure what your point is. That these things are unimpressive? Agreed. It's just one lazy approach to a problem (multi-platform apps) that's not easy to solve. Webviews are a cheap way to get there.
Re:Wails: Build cross-platform applications using Go by pjmlp on Saturday July 16, 2022 @05:25PM (#32122120)
The way is to use the Web as is, and native for everything else.
Re:Wails: Build cross-platform applications using Go by solardev on Saturday July 16, 2022 @05:29PM (#32122146)
Yeah, if you have unlimited time and money.
Re:Wails: Build cross-platform applications using Go by pjmlp on Sunday July 17, 2022 @01:03AM (#32124607)
Apparently plenty of business do.
Re:Wails: Build cross-platform applications using Go by solardev on Sunday July 17, 2022 @02:15AM (#32124874)
May you be lucky enough to work for them.
Re:Wails: Build cross-platform applications using Go by pjmlp on Sunday July 17, 2022 @02:51AM (#32124987)
Plenty of people are.
Re:Wails: Build cross-platform applications using Go by skyfalldev on Saturday July 16, 2022 @02:42PM (#32120718)
Mostly because with Wails/Tauri/Electron, you get file system access, native code etc.
Re:Wails: Build cross-platform applications using Go by howeyc on Saturday July 16, 2022 @03:24PM (#32121101)
yeah, the exe running the server (Go in the current case) has access to all that.
Re:Wails: Build cross-platform applications using Go by stewbrew on Saturday July 16, 2022 @03:37PM (#32121209)
This way you know exactly which browser people are using and you don't have to deal with idiosyncrasies.
Re:Wails: Build cross-platform applications using Go by stu2b50 on Saturday July 16, 2022 @05:10PM (#32122006)
Because normal users expect a unified app experience and launching a local server that opens a tab in the browser is not an acceptable experience to them.

There's also limitations with that, like the inability to use the browser native file browser picker.

Re:Wails: Build cross-platform applications using Go by dainiusse on Saturday July 16, 2022 @03:03PM (#32120920)
Why would you run visual studio code in your computer?
Re:Wails: Build cross-platform applications using Go by timeon on Saturday July 16, 2022 @04:06PM (#32121458)
To use all the RAM.
Re:Wails: Build cross-platform applications using Go by solardev on Saturday July 16, 2022 @04:56PM (#32121890)
That's what WebStorm is for.
Re:Wails: Build cross-platform applications using Go by lovelearning on Saturday July 16, 2022 @08:24PM (#32123206)
Some people don't like the user experience of doing everything in the default browser. It's subjective.
Re:Wails: Build cross-platform applications using Go by kitd on Sunday July 17, 2022 @03:37AM (#32125132)
How did the local url get there?

Or, to look at it from another angle, you could just click on the app and it opens?

Re:Wails: Build cross-platform applications using Go by shroompasta on Saturday July 16, 2022 @03:58PM (#32121401)
performance.

some apps need native functionality, for example, instagram needs access to your camera.