Live data from Hacker News

Web apps are better than no apps

molodtsov.me

161–170 of 199 posts

Re: Web apps are better than no apps

#161

I hate to agree with this. Web is the best way to cram loads of features into a limited amount of dev time. But still, whenever I use Teams, something like this happens: I click a button, nothing happens. I wait 10 seconds, because teams sometimes just needs a little longer. Nothing happens. I click the button again, it finally starts doing something. 5 seconds later, the thing I wanted appears. And every time it hap…

You can program junk in any language. I've built a pretty neat real time web application using nothing but JavaScript and a little thinking. Could it be better? Yes, no doubt. I could have written it as a native application for all of the platforms that it currently supports (Desktop on Windows, Mac, Linux, mobile phones Android and iPhone). But I really don't have the time or the resources for that so this helped me…

The web version of teams works much better than the "native" one. Pressing F5 when it stops working is much faster than restarting an entire browser.

But then microsoft just decides to kick its users in the balls again by adding a feature that allows outgoing calls only on chrome and edge while blocking firefox. Meetings work, so that's obviously bullshit.

I guess electron isn't what makes teams terrible, but rather microsoft.

Re: Web apps are better than no apps

#162
As someone who's been using Linux for around 15 years, this is a sentiment I often find myself expressing to younger (at least in Linux time) friends complaining that some commercial app we both use is Electron-based - I'm too busy being amazed that we have first party Linux support at all, and I can see clearly what technology it was that led us there. Yes in theory companies could all be writing cross-platform Qt apps, but the reality is most were/are not, and the proportion of non-FOSS desktop apps that have official Linux support has gone noticeably up via Electron

The old (Qt?) Spotify client was better and also supported Linux though, I'll concede that

Re: Web apps are better than no apps

#163
post #34

Earlier quoted context omitted.

> For a web app the speed of the language is rarely the bottleneck anyway I think there’s some selection bias in this; the apps that get built as web apps tend to be the ones that are not bottlenecked by JavaScript. For exceptions that are pushing the limits of performance, you’ll more often than not find Rust/C++ compiled to Wasm in the stack.

We build a full game creation IDE and game engine which is entirely browser-based and almost entirely written in JavaScript (including all the performance-sensitive stuff), and the performance is ridiculously good[1]. You don't need WASM for good performance[2]. [1] https://www.construct.net/en/blogs/construct-official-blog-1... [2] https://surma.dev/things/js-to-asc/

Fair enough, Construct looks cool. If you or anyone from your team is interested in doing an interview for a technical newsletter about browser-based apps[1] I'd be glad to get a JS perspective on high performance in the browser.

[1] https://digest.browsertech.com/archive/

Re: Web apps are better than no apps

#164

One thing that makes me use a web-app rather than a native one on PC is that I know for a fact that the browser app will be very limited in tampering with my computer, something I'm not so sure about when installing native applications. Often I see Nvidia's or Microsoft's or Discord's own services snooping in my installed applications, but it can go much further with, e.g., applications like grammarly that have acces…

> One thing that makes me use a web-app rather than a native one on PC is that I know for a fact that the browser app will be very limited in tampering with my computer, something I'm not so sure about when installing native applications. I see this as more of a failing on the part of desktop OSes than anything. I know a lot of more technically inclined folks are used to the programs they run having access to all the…

It's a failure of our security model still being based on room-sized machines from half a century ago. There, many users shared the same machine, so protecting them from each others' files was the main focus. But it was assumed that any program run by the user was fully trusted - either they were an expert programmer, or an office worker who had been given a prescribed set of trusted programs for their duties

Smartphones have been beneficial as they've shown an alternative model built essentially from a clean slate (their non-original kernels are of little relevance here), proving that a more fine-grained permissions model does work in the "real world" for most "ordinary person" use cases, though advanced users will likely always need to make use of escape hatches at times. And now we have technologies like Flatpak and distributions like Fedora Silverblue which are slowly but surely bringing it to desktop

Also for Windows I think the transition can be done. It doesn't need to be a big bang. Imagining something like Flatpak-style isolation, just introduce it as an enterprise feature, requiring explicit enabling by the admin for each program. These first users will therefore be sysadmins who know what they're doing more, and will also see the most benefit of it. Then roll it out for general users, perhaps allowing developers to add their own programs to a default-enable list (incentive to do so undetermined). Then eventually move to a fully opt-out model where you just disable it on problematic programs (and have another list of known ones). And also have a registry flag to globally disable it, for the peace of mind of skeptics

Re: Web apps are better than no apps

#165

Earlier quoted context omitted.

Leave tech world and look at what people have. Most iPhone users have Windows machines.

I'm not talking about windows and iPhones though, iPhone users are buying iPads, why would they buy an android tablet? If anything, it's tech world that has less brand loyalty. I have an apple, windows, and android. The average tech user though? They're probably going all in on one

Do you want to advocate that everybody buys a single brand?

Or do you want competition in the smartphone space?

You know, where people can freely move from one brand to another if they don't like certain aspects of their current brand? Like how the free market is supposed to work?

Re: Web apps are better than no apps

#166

I hate to agree with this. Web is the best way to cram loads of features into a limited amount of dev time. But still, whenever I use Teams, something like this happens: I click a button, nothing happens. I wait 10 seconds, because teams sometimes just needs a little longer. Nothing happens. I click the button again, it finally starts doing something. 5 seconds later, the thing I wanted appears. And every time it hap…

Teams has to be the poster child of “enterprise software”. I’m currently on contract at a large healthcare company and I’m starting to understand how an app as abominable as Teams could be built. The issue isn’t really with the tech stack, though electron is not the best, other companies like Discord have managed to build much better apps on top of it. The issue I see is organizational. What happens is you have a top…

> other companies like Discord have managed to build much better apps on top of it

Not to mention Microsoft themselves! VS Code is probably the shining example of what performance you can get out of Electron - with the caveat that it did take more engineering effort than I'd expect out of a chat app, and it's still more resource hungry than equivalent native editors/IDEs

Re: Web apps are better than no apps

#167

Earlier quoted context omitted.

> JavaScript isn't as fast as C++ or Rust, but it's pretty fast. Around the speed of Java and Go in some cases, which are compiled. Sorry, not even remotely close. I want to see some serious evidence. JS id as unoptimizable as can be, thanks to its hyper dynamic nature. And js developers without any clue about memory will happily allocate hundreds of thousands of unnecessary objects to save a line of code. Completely…

I did a double take when I read this too. However, I’d wager that in 99% of cases the bottleneck isn’t at the language level for most desktop apps or GUI apps in general. I have an app that has one pretty frequent cpu intensive call (it computes the lcs for diffing). I decided to benchmark a rust wasm bindgen implementation against the js one I was using and found that ironically enough, node did perform better than…

Just use Workers API and spawn another JavaScript thread

Re: Web apps are better than no apps

#168

Earlier quoted context omitted.

I take these performance benchmarks with a rock of salt. They are mostly hyper-optimzied generics which are as far away from actual production code as it can be. They are written in a way to allocate as little memory as possible and is done by people who know exactly what they are doing. Especially the garbage collection strategies of Java are second to none (sorry, don't want to be a shill). > For real-world applica…

My experience is that IntelliJ takes way longer to start and freezes more frequently.

How often do you start up your IDE a day?

Re: Web apps are better than no apps

#169

Earlier quoted context omitted.

I did a double take when I read this too. However, I’d wager that in 99% of cases the bottleneck isn’t at the language level for most desktop apps or GUI apps in general. I have an app that has one pretty frequent cpu intensive call (it computes the lcs for diffing). I decided to benchmark a rust wasm bindgen implementation against the js one I was using and found that ironically enough, node did perform better than…

Just use Workers API and spawn another JavaScript thread

Well then you’re back to the bridge problem. postMessage is crazy slow. There are some problems where parallelization will outperform the ipc cost with postMessage but those problems are few and far between. I haven’t dove into the new web GPU api but it does look kinda promising (shared memory is hard, so I’m apprehensive). I’m sure some of these things will get solved in the long run but for the time being, the bottleneck to browser performance is not necessarily JavaScript itself but the webapis that are crafted around a single threaded model. This is really my only point. Aside from providing systems engineers familiarity with syntax/devex and possibly some portability with some llvm/wasm compatible libs, there is little point in wasm runtimes at this current time imo.

citation:

https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers...

“Data is sent between workers and the main thread via a system of messages — both sides send their messages using the postMessage() method, and respond to messages via the onmessage event handler (the message is contained within the message event's data attribute). The data is copied rather than shared.”

Re: Web apps are better than no apps

#170

Earlier quoted context omitted.

Absolutely. For anything internet-based (social media, chat, meetings etc.) web apps are vastly superior for this reason. In fact, anything which doesn't explicitly need the richness of a true desktop GUI (e.g. Photoshop or games) should probably be a web app. In addition to the massive benefit of running browser-sandboxed, web apps are also: 1. Easier to start and stop (open/close a tab) 2. Less permanent (clear you…

Even mobile apps have much more finely grained privacy and security controls and sandboxing. It feels like we should have multiple classes of browser apps - consumer apps (Discord, Slack, Spotify, Steam, etc) that are more mobile-like in their explicit permissions and dev tools that carry warnings for their largely unbounded behavior. Or perhaps even have “dev mode” on your machine that opens up access to system proc…

maybe wasm+wasi(x) would allow us to build an open "app store" platform or a sort of package manager for desktop apps?

it could provide a cross platform, sandboxed alternative to Shipping Chromium, while still supporting web technologies to build the GUI (powered by the system's native web view?)

i dont like having a centralized platform but i guess we could establish a standard file format (like .deb or AppImage?) or have a federated platform? i really know very little about all this though...

Post reply on HN