Live data from Hacker News

App Should Have Been a Website (and Probably Your Game Too)

rogueengine.io

321–330 of 384 posts

Re: App Should Have Been a Website (and Probably Your Game Too)

#321

Earlier quoted context omitted.

The web is just a beautiful publishing platform. - no permission needed (mostly) - built-in discoverability - you get to figure out whatever payment processing you want - works on every device - update code in seconds - no copy protection needed

> works on every device Assuming that the device has an up-to-date browser available for it. And today, that usually requires having a multi-MHz multi-core processor and GiBs of memory. No matter how lean your actual application/website is. I have a stack of E-Ink readers, all in terrific condition. My favorite is the B&N Nook Glowlight 3. When it was new just about five years ago, I could install a web browser on it…

I feel your pain, though I blame the websites more than the browsers. I can run full firefox on my OG pinephone as long as the sites I visit aren't running a pile of JS lunacy.

My Onyx Boox runs Firefox happily too, but for that and the pinephone I'd recommend trying out a Gemini browser (there are several on fdroid). It's lacking plenty, but has an old-web feel, no sites are slow, and you can handily use it on old devices.

Re: App Should Have Been a Website (and Probably Your Game Too)

#322

Earlier quoted context omitted.

> RAM is cheap RAM is cheap for you. It's always silly when people bring up their top-of-the-line computer into discussions about performance. Software shouldn't be just for the top 1%.

Apple RAM is expensive. Every other kind of RAM is pretty cheap. 32GB DDR4 can be had for under $30, and 16GB DDR4 can be had for about $25. I'm not sure who you think has a computer, is developing software, and can't afford that. Maybe someone in India, I guess. Too bad if that's you, but "top 1%" is a laughable claim when RAM is so cheap. 16GB of RAM is nowhere near "top of the line". You're just trolling here, "hn…

Not when it is soldered on a mobile phone, tablet or laptop, and getting more implies throwing away an otherwise perfectly working device.

Re: App Should Have Been a Website (and Probably Your Game Too)

#323

Earlier quoted context omitted.

WebTransport is now supported in most common browsers (just missing safari support) and provides a nice API for sending/receiving messages via UDP. https://developer.mozilla.org/en-US/docs/Web/API/WebTranspor...

Thanks for pointing this out! I wasn't aware this had more or less landed. (though I think my broader point about cross platform support unfortunately still stands, I personally don't care about supporting iOS on my side projects and I'm excited to mess with this)

I wasn't aware this had more or less landed.

That’s usually a sign nobody uses it because it has at least one large issue. Personally I stopped falling for “there’s now X” advices long ago because if it worked, it would already be mainstream very much heard of by everyone. Sorry for your five hours.

Re: App Should Have Been a Website (and Probably Your Game Too)

#324

Earlier quoted context omitted.

As a frequent user of both web and phone airline apps, the phone apps are just nicer . UI idioms that are appropriate for the platform, etc.

Only if they’re designed that way. Many aren’t.

Ready to use (or buy/download) controls in appdev usually pack some ui wisdom into themselves for free, borrowing most of it from the base system.

Webdev is constant reinvention of a wheel in all sorts of wrong ways, with “components” on the same level of ui quality.

Many apps are just electron apps or vb-like (x,y,w,h) forms slapped together by someone barely familiar with a platform IDE. But the rest is absolutely superior to the “web”.

Re: App Should Have Been a Website (and Probably Your Game Too)

#325
> WebGPU and web games are said to be catching up to native-level performance, and some argue they’re already there.

I can’t agree with that, sorry. I’m developing 3D games for the web, and the limitations are asset size, memory size, and CPU/GPU constraints feel like developing games with 2001-era resources. The web isn’t there yet, and I’m not sure it will be anytime soon. There are some impressive apps leveraging the web’s fast distribution, but 3D games are harder in that regard. You can create content-rich, visually appealing 3D games, but then you severely limit your audience. I’m considering moving to native game development because the web’s limitations are daunting.

Re: App Should Have Been a Website (and Probably Your Game Too)

#326
post #321

Earlier quoted context omitted.

> works on every device Assuming that the device has an up-to-date browser available for it. And today, that usually requires having a multi-MHz multi-core processor and GiBs of memory. No matter how lean your actual application/website is. I have a stack of E-Ink readers, all in terrific condition. My favorite is the B&N Nook Glowlight 3. When it was new just about five years ago, I could install a web browser on it…

I feel your pain, though I blame the websites more than the browsers. I can run full firefox on my OG pinephone as long as the sites I visit aren't running a pile of JS lunacy. My Onyx Boox runs Firefox happily too, but for that and the pinephone I'd recommend trying out a Gemini browser (there are several on fdroid). It's lacking plenty, but has an old-web feel, no sites are slow, and you can handily use it on old d…

  > I feel your pain, though I blame the websites more than the browsers.
I blame the standards organizations.

I love the Boox devices as well. My Note Air 2 Plus is almost two years old, it is a terrific machine. I'd love to know what your use cases are. I mostly use it for taking notes and reading - including on the web - but I'm rather unhappy with most browsers on it including Firefox. For one thing, Firefox on Android has almost no keyboard support.

Re: App Should Have Been a Website (and Probably Your Game Too)

#327

While the web platform is catching up due to the continuous supply of abstractions by modern browsers, once you must deviate from those abstractions, you quickly find yourself needing to implement something yourself that is much less efficient than a native implementation. I wrote about developing my own block editor from scratch[1] using C++ and QML after finding that Notion (and so many other web apps) are extremel…

I am not sure if it's worth it though.

As you have pointed out, QML is buggy. Chromium's rendering engine is probably the most stable and polished GUI toolkit there is, not to mention a cross-platform one too. Throughout the last 10 years I only had to deal with 2 Chromium bugs and they were very minor. Well-written JavaScript is fast and the machines are getting faster every year. It does not take much real time computation to provide a UI for a desktop app, it's not a video game. And many of the those things that are real time, like the caret in the text editor or hover states are implemented in native code by the web browser, with no JS interaction. I agree though that a block editor is a little more real time than the average UI.

The key word is well-written JavaScript. What is the most popular state management framework? Redux, possibly. What is the most inefficient state management framework? Also Redux. With Redux, if you have an app that displays a timer that updates every second, every subscription to any piece of the state throughout the entire app will trigger. I'm not sure if the app used Redux, but I used to use a time tracker app that would use 30% of my CPU when idle (I since moved to a CLI C++ solution and it is so much faster, but that does not mean a decent time tracker could not be built with web technologies). So if Redux is the most popular framework, you can see just how little the average web dev cares about writing apps that are not slow resource hogs.

> Also, all web apps couldn't handle loading a very large text file (they were all hanging).

Could it be that QT has some optimisation technique to not render all those lines out of view? I.e. if you have a huge file that can still be loaded to RAM, C++ won't sweat it, but is it actually getting all rendered at the same time in a savvy implementation, whether at the level of the app or the framework? Probably not. On the other hand, the textarea element or a contentEditable div just was not made for something like this. It could still be developed by implementing a custom element / component that loads the text dynamically while scrolling. If it's too much for JS to hold, it could use WASM or another process and pass it with IPC. It is definitely possible to write an Electron-based text editor that can open a 1 GB text file efficiently, it's just not out of the box experience and most people do not think there's a need for such a use case.

Re: App Should Have Been a Website (and Probably Your Game Too)

#328

Earlier quoted context omitted.

> The need to remove the capability was informed by the complex security and privacy concerns associated with web apps to support alternative browser engines that would require building a new integration architecture that does not currently exist in iOS and iPadOS. This rationalization makes zero sense, it's just opening a standalone browser window from a convenient icon shortcut. They could even ignore the manifest.…

Shows why guessing and gut feel are bad basis for opinions. In fact, Apple’s problem was that the PWA serviceworker runs as root, a bad decision made years ago. Enabling Chrome-hosted PWAs means Google gets root on those peoples’ phones. We can still lambast Apple and go all ad hom, but let’s stay factual?

Service Workers do not require an installed PWA. Every regular website can have a PWA. I'm not sure who came up with this explanation for Apple trying to kill PWAs in Europe, but it makes zero sense.

Re: App Should Have Been a Website (and Probably Your Game Too)

#329

While the web platform is catching up due to the continuous supply of abstractions by modern browsers, once you must deviate from those abstractions, you quickly find yourself needing to implement something yourself that is much less efficient than a native implementation. I wrote about developing my own block editor from scratch[1] using C++ and QML after finding that Notion (and so many other web apps) are extremel…

I am not sure if it's worth it though. As you have pointed out, QML is buggy. Chromium's rendering engine is probably the most stable and polished GUI toolkit there is, not to mention a cross-platform one too. Throughout the last 10 years I only had to deal with 2 Chromium bugs and they were very minor. Well-written JavaScript is fast and the machines are getting faster every year. It does not take much real time com…

Hi there! Indeed, QML is very buggy. But there's also a large discrepancy between Chromium's budget (Google) and The Qt Company. Also The Qt Company tend to prioritize advancement in the embedded world (where it probably gets most of its cash) rather than regular applications. So, many bugs get fixed through open-source contributors (KDE, individuals, etc) And that might be a big reason why non-critical bugs don't get prioritize enough.

Like with anything, we're dealing with abstractions. Qt and QML are also abstractions. But I'd argue they are better abstractions than the web for dynamic semi-complex to complex applications (for static sites/simple applications, the web is fine). The reason Qt and QML are a great abstractions are mainly:

1. Native modules/APIs - you can always plug in native modules into your app as needed. For example, I use native Objective-C APIs to draw the window on macOS for my app. It just looks better than what you get with just Qt.

2. Performance - Almost all QML-based components (called Qt Quick), are written in fast, compiled language C++, and if needed, you can create your own components in C++ and expose them via QML.

3. There are many more reasons, one of them is that I think QML is the best declarative UI language I've seen, and it plays very nicely with Qt style of C++ (signal and slots etc.).

> Could it be that QT has some optimisation technique to not render all those lines out of view?

Well, I detailed in my blog post my technique - it's not really novel - you can build virtualized lists in many languages, including JavaScript. You can look into the source code of many web apps that have done the same type of block editor that I implemented. MarkText[1] seems to be the most efficient one from my testings. My point is that building upon the abstractions of the web makes it very hard to write truly efficient code that is well-optimized for your computer resources. You might be an amazing programmer, but you're limited by a certain upper bound of performance, by the mercy of the web standards council and web browser engines implementation of those standards.

[1] https://github.com/marktext/marktext

Re: App Should Have Been a Website (and Probably Your Game Too)

#330

Earlier quoted context omitted.

> On the other hand, there is absolutely no reason that Uber or Waymo needs to have an "app". Here’s one: I don’t give websites my location or the ability to interrupt me with notifications. Ever. I’ve blocked the browser from doing this entirely. I have Uber and Lyft apps installed and granted those permissions though.

Funny, I blocked notifications from the Uber and Lyft apps because they kept spamming me. And the notifications aren’t all that useful, since I’m actively checking the app whenever something time sensitive is happening anyway. Location is super useful here, of course.

I was referring to lock-screen notifications (time-sensitive notifications on iOS?), which are quite useful in this context. It was a feature basically designed for apps like Uber, and I do t think it’s available for web apps.
Post reply on HN