54
submitted 1 year ago* (last edited 1 year ago) by zyratoxx@lemm.ee to c/asklemmy@lemmy.ml

Not really that worried but rather curious about your opinions. Use what suits your demands best.

But for starters:

Electron is a framework based on Chromium used to develop desktop apps. Examples of apps that are built on Electron are Discord, Element Desktop, MS Teams, Slack, GitHub Desktop, Atom, VS Code and counting

you are viewing a single comment's thread
view the rest of the comments
[-] zyratoxx@lemm.ee 1 points 1 year ago

Oh, cool. I've barely scratched the surface on that topic, therefore I got a few more questions concerning PWA and Electron apps:

Are PWAs "only" websites that are shown as an app or do they have features that would distinct them from "normal websites"?

Can PWAs reserve disk space for offline downloads for example (Spotify has got a PWA but that one is mainly their website shown as an app). And I probably can't install a listener via PWA like Discord does for their Rich Presence, can I?

I expect the last one to be a no because that's probably not what you'd use a PWA for as far as I understand, but I'm especially interested about the first question

[-] ShortFuse@lemmy.world 2 points 1 year ago* (last edited 1 year ago)

Are PWAs "only" websites that are shown as an app or do they have features that would distinct them from "normal websites"?

In theory, they're the same. In practice, user agents (read: browsers) can dictate extra, uh, privileges to PWAs. For example, Safari Mobile won't allow push notifications for just websites. As a dev, we don't control this aspect. We just code "isPushAllowed()` and continue from there. As a marketer or apps/software I learn what browsers and environments allow what, so I know they need to install as a PWA to get access to some APIs.

Can PWAs reserve disk space for offline downloads for example (Spotify has got a PWA but that one is mainly their website shown as an app).

Branching off the other point, it's up to the user agents. For example, Safari Mobile will delete storage for websites after a certain time (I think 6 months). But PWAs have unlimited lifespan (a misconception years ago). It's not what you asked (storage size vs lifespan), but it gives you a clue to how browsers manage this. I personally haven't experienced much issue with storage, but I do know there's even a File API which gives access to your actual drive. I would imagine if browsers are allowing us to access "unlimited" storage over the file system, the restrictions for the Local Storage aren't that important.

A short search brought me here which mentions 80% of total disc space for Chrome, 50% for Firefox, and 1GB for Safari. Nothing here talks about PWAs, but I'd imagine Safari is the only one worth concern. I can research more if you want, but it's not in my use case to concern myself with local storage.

Edit:

And I probably can't install a listener via PWA like Discord does for their Rich Presence, can I?

As long as there's an API, for better or for worse, we can do it in PWA. From what I read, there doesn't seem like anything like this in the Web API. Background tasks are currently somewhat restricted in the interest of battery conservation of mobile devices. From a theoretically point, an app running in the same environment as the PWA could have somethig shared between them. There are API in addition to Web APIs, like extensions, but there's probably a lack of normalization for detecting what is running on the device.

The idea of making everything in the Chrome Addon/Extension API in to real API is part of Product Fugu and from looking Chrome never built anything to expose what native system processes are being run with a web site. It's honestly such a specific (and invasive) prospect I doubt it'll ever happens. The closest is chrome.tabs but there's no web equivalent.

Sharing of other PWAs running probably won't happen because sandbox/isolation is pretty core to Web right now. Cross-app data sharing is something I don't know about yet, but maybe if PWAs mature we'll see that. Then games and media players can "broadcast" to other PWAs data like presence. I'd imagine that branch from the Web Share API.


I'll take this opportunity to state my bias. I believe in the Web standards, meaning it shouldn't matter what browser or environment you use. They should all be the same. I want this for myself and express this to my clients.

But because standards are "living" it's always a moving target. What is supported today by your preferred setup may not take full advantage of what a Web App provides. But the idea is, after a while, you will gain those features later in your setup as browsers get better.

This is something I've seen in practice since I wrote a lot in PWA and told my clients that eventually it'll be in Safari, but I'm not going to write a native app for outdated browsers. And the investment paid off. Before, Safari users didn't have Wakelock, Push, or good WebRTC experience, but today they're mostly indistinguishable from Chrome Android. I didn't have to change a single line of code to make that happen.

[-] zyratoxx@lemm.ee 1 points 1 year ago* (last edited 1 year ago)

Woah, thanks so much for that detailed comment. I really learned a lot today (and my day has barely started yet).

I had to write a small shop web app for my programming finals using C# and Razor pages. I then had an internship where my team and I developed a Blazor app using MudBlazor which was a really cool experience. It was back then when I when I really felt how Firefox and Chromium have their little differences since I developed it using Firefox and it was broken on Chromium.

I've since not done much tho because I've focused more on the networking path but that info was really exciting me to try setting that up on my test project just for fun ^-^

this post was submitted on 25 Aug 2023
54 points (100.0% liked)

Asklemmy

43859 readers
1640 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy ๐Ÿ”

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~

founded 5 years ago
MODERATORS