Hacker News new | past | comments | ask | show | jobs | submit login

Why do you need web apps wrapped in their own window, though? Just open a browser.

Relatedly, Electron is a problem because desktop apps nowadays require a huge browser just to display a window, not because web apps are packaged in a browser to get slightly better desktop integration.




Electron app:

    works offline
    has more permissions
    can use udp
    separate alt-tab, tray display
    is not throttled because it's in the background (on desktop)
    unaffected by browser settings
    unaffected by clear cookies
    unaffected by extensions
    less confusion over who handles keybinds


Are these supposed to be advantages over using the browser for these "apps"? As someone who uses the browser for most of these things, I was looking for some reason why the electron app would be better and I don't see any (and see some definite negative aspects).


Do you really not see any of these as advantages, at all?

You don't use a task bar on your computer? You would never want to be able to alt-tab to a programming IDE or music player?

You can't imagine why someone would want to be have a programming IDE like Atom that didn't need to pop up a dialog box literally every time you wanted to save a file to disk?

You can't imagine why someone would want an IDE like Atom to automatically read from their local Git config and hook into native commands for functionality like file grepping? Or why someone would want to be able to use native volume controls to separately control volume in a music player and their overall browser?

You've never wanted to start a long-running process in an application and then alt-tab to a separate program while it completes without that process getting throttled?

You can't imagine why someone would want to clear all local data from normal websites in their browser without also clearing all of the local data stored in every web app that they're using? When you want to clear some old files on your computer or empty your trash, do you prefer to just `rm -rf` your home directory?


> Do you really not see any of these as advantages, at all?

I can see how they would be an advantage to some, but a detriment to others. I don't find any of these things to be enough of an advantage to outweigh the advantages of having it in browser.

> You don't use a task bar on your computer?

Nope.

> You would never want to be able to alt-tab to a programming IDE or music player?

Having these in browser means 1 less window to keep on the desktop taking up space so I don't need to alt-tab as much. I can see both my IDE and my browser at the same time.

> [ .. Atom, more interactive app section ...]

I don't use Atom or VSCode (electron-based editors) so this isn't an issue for me. But I can totally see wanting these to be as native as possible, so using them that way makes sense. So I'll 100% concede the point for code editors.

For data I use Firefox containers to keep that things compartmentalized sufficiently so there to no need to worry about polluting local data stores.


What browser do you use that is unaffected by browser settings? Sounds like a metaphysical anomaly to me.


I'm not saying a browser isn't effected by its settings. I'm saying that not being affected by browser settings is not an advantage. If I'm running an in-browser app, I want and expect it to be effected by my browser settings.


I mean, few if not most of those things are available in PWA and via plugins (containers?), maybe not on apple but they are on windows and Linux.

There is a new filesystem api: https://web.dev/file-system-access/

Electron still provides more freedom but I would argue many of the existing electron apps don't need it.


Most of that applies to PWAs, daemons with Web UI and native UI Web Widgets, no need to package a browser with the application, contributing to Chrome market share.


Web apps have been able to work offline for like a decade now, iirc.


Not well. I'm optimistic about the web in general, but I consider good, reliable clientside storage to still be an unsolved problem, at least for the moment.

Some of the things we're still missing:

- the ability to easily share data between domains without opening yourself up to massive security risks.

- the ability to share data with native apps.

- the ability to move data between browsers without syncing it to an online account.

- the ability for normal users to inspect offline data.

- the ability to trust that browsers like Safari won't just arbitrarily delete your data one day.[0]

- the ability to trust that browser upgrades won't ever corrupt the data you have stored.[1]

- the ability to share large amounts of data without worrying about storage limits (this matters a lot if you're making an editor like Atom or Visual Studio).

Typically, what I see with offline apps is that they'll use offline storage, but they don't trust it. They use it when possible as a progressive enhancement, but then they have to sync that data to a server someplace if it's something that users actually care about. And that matches my experiences as a web developer as well. I can't imagine building something like a password manager or text editor in-browser that was only storing data locally, I wouldn't trust that.

It's also not just a technological problem, it's a problem of UX. If I tried to make a purely offline web app, I'd be getting angry customer calls in a week asking where their data went just from them clearing browser history and not realizing that it deleted all their data as well. There isn't a user-friendly, user-controlled way to indicate that storage for one website should be permanent, and users aren't really trained to think that way about the web anyway -- their instinct is to think of it as transient.

----

[0]: https://ar.al/2020/03/25/apple-just-killed-offline-web-apps-...

[1]: https://www.androidpolice.com/2019/12/17/google-fixes-chrome...


> can use udp

What are you even talking about? Any unprivileged process can open a udp socket.


The parent is talking about pros/cons of browser vs Electron. You can't use UDP from the browser


That comment was in response to

> Why do you need web apps wrapped in their own window, though? Just open a browser.


Interesting. The context isn't even very far from the comment. It's literally one comment up. I've noticed this quite often on HN. Is it a working memory issue?


I like Slack and similar having their own icon and entry in the alt-tab switcher. Absent ubiquitous PWA support, electron is sort of the least bad alternative.


Sounds like there is an opportunity for someone to provide a way to display an icon in the window manager that saves a gigabyte of RAM. :D


ironically, windows just included this for Edge, you can alt tab between browser windows and you can put websites as taskbar apps ( and will also jump to all windows of the app easily as well)


Chrome apps?


.lnk files. Or on Linux, .desktop files. Can contain an URL. You click it, a browser opens. The tech is decades old at this point.


I believe he meant an icon for the running window, not one on the desktop or menu.


You can kind of do this with Chrome for any website. More tools->create shortcut in the menu.


We’ve used this for years as our answer to users who request a desktop app. They’re generally pleasantly surprised and satisfied with the result.


Yeah, my experience is that these behave in unusual ways: it’s ok, but they always feel a bit off, even compared to Electron


You have to design your site for this, back in the IE days we did this for some corporate tools and went full kiosk mode. The user didn't even know that it was a website.


Ah, fair point. Electron is a good fit for web apps that would otherwise live in a browser, I agree.


File system access? Ability to Play a Video stream without a user click? Access to non-CORS enabled APIs if needed?


Most apps don't need that feature. In fact, the apps which insist on electron experience often misuse it. Think of the zoom daemon that remained on mac desktops even if you uninstalled zoom.


Every time I click a zoom link these days on macOS, I get really annoyed that I have to click again to get into the video call: the security issue was unfortunate, but (for me) Zoom was absolutely right about the UX.


Zoom has nothing to do with electron


All of them doable with daemon applications, plus file system access APIs are already available.


Unfortunately you have things like Discord that require access to native APIs in order to properly function (eg. Push to talk).




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: