Live data from Hacker News

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

rogueengine.io

271–280 of 384 posts

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

#271

Earlier quoted context omitted.

>HTML alone is not sufficient for a decent looking UI Well that's some nonsense. HTML can absolutely achieve 1:1 on any UI you care to mention. It isn't even difficult if you have any skill at all. >And then there’s JS. And then there's another person who didn't take the time to learn JS and just hates it for reasons . >Rails, htmx, and a few others seem like the only ones who really get that a simple web app should…

I have learned JS & used it extensively in many projects. Including modern SPAs. And I absolutely despise it & wish I could use something like recently trendy GO or RUST. JS has absolutely no rhyme or reason, single threaded nature makes it gunk up browsers crazy quickly & the insane bloat of "frameworks", which attempt to completely replace already great APIs, while working on top of them... IS CRAZY!

>JS has absolutely no rhyme or reason

That's really false. The type coercion matrix does make sense for the job it is supposed to accomplish, even if you personally don't agree with it for whatever your reasons are.

https://media.geeksforgeeks.org/wp-content/uploads/advanced-...

If you haven't seen the info presented like this before, then I can understand why Javascript might seem "CRAZY" after reading so many blog posts by people who like to complain for clicks. If you think this chart doesn't have any "rhyme or reason", then please explain why.

>single threaded nature makes it gunk up browsers crazy quickly

That's one way to look at it. Another way is to learn how to work with the system you have, not the system you want. Improvements to the system can be slow, and can't be breaking changes. This is true about every system humans have ever devised.

Webworkers are great, you can absolutely do multi-threaded Javascript, I've done it, it was easy. If that solves the problem in a reasonable amount of time, great, if not then I'll probably do it in C and run it from Javascript since it's so easy to write the rest of the application with Javascript.

Not everything needs maximum performance. For some embedded systems I usually write 100% assembly language because every byte and clock cycle matters. But I know all of this really well, so maybe it seems easy for me. When I started with Javascript in Netscape in the early 90's, it wasn't as well documented and well supported as it is today. That version of Javascript was a bit rough around the edges. But today? Naaa. It's easy, it's got a huge support system, a lot of progressive enhancements, thousands of videos, millions of developers and about a billion blog posts on medium.com.

I switch back and forth from C to Javascript and it's a great combination. Less context switching, the syntax close to 1:1 as far as I'm concerned. But C is a pain in the ass in comparison to Javascript, and I know both languages extremely well. I've been writing software almost 50 years.

>the insane bloat of "frameworks"

I'm using Preact for my embedded IoT front-end and the complex web app it compiles is less than 50KB total gzipped. Bloat is a choice, not a requirement.

I have complex front-ends running "at web scale" based on jQuery (for business reasons). We decide every byte that gets included, and manage to score 100% on all page speed tests. No bloat.

>which attempt to completely replace already great APIs,

Citation needed.

> IS CRAZY!

People have been using Javascript successfully for decades. Sorry Javascript isn't your favorite language, but it's not as you describe it either.

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

#272

I man don't get me wrong, I love the idea of PWAs but this dude is out to lunch. It's so painful making anything complex work cross browser/cross platform. On iOS iirc they don't even support adding PWAs to the homescreen? You definitely can't Bluetooth outside of Chrome (probably only on Android and Windows too because nothing fun is ever allowed on Macs). Multiplayer games you kind of need UDP. You cannot UDP in th…

Do you need UDP? I see lots of multiplayer browser games. Here's a few

https://browsergames.gg/

Google shows me a bunch of RPGs

https://www.google.com/search?q=browser+based+rpg

FPSes here

https://poki.com/en/shooting

or maybe better a video showing some

https://www.youtube.com/watch?v=9ad5jcXPbNw

I know none of them are Edlin Ring, Skyrim, or Call of Duty. One issue with Web games is users's expect them to start quickly so no downloading 80gig of assets like 102gig for CoD Black Ops 6

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

#273

Web gaming might be a decent incremental revenue source ( But it will never be more than that. 1. Game ops is too entrenched in mobile. The entire stack (user acquisition, analytics, monetisation) is tried and tested on mobile. These are difficult problems that seem easy to port to web games, but “devils in the detail”. Eg When you’re waiting on appsflyer to ship an update to properly attribute reinstalls for 6 month…

While I'm sure it wouldn't be easy, it sounds like an opportunity for disruption.

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

#274

Earlier quoted context omitted.

> On iOS iirc they don't even support adding PWAs to the homescreen? They literally supported this since iPhone OS 1.0 (it wasn’t even called iOS yet). In fact, it was supposed to be the only way to add apps to the iPhone until people complained and started jailbreaking to install their own apps. Apple didn’t release the App Store and the iOS SDK until iPhone OS 2.0

I don’t think parent means the same or maybe he does. On chrome and edge on macOS one can choose to install the PWA as a native app. It gets an app icon and everything. It’s similar to a web bookmark on the HomeScreen. But it’s a sandboxed app. Don’t know if this is the exact same behavior though. PWAs are also a bit different to normal websites. They have a manifest and what not to describe the app in a standardized…

[deleted]

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

#275
Just to add another perspective:

Native apps are sticky. As an example a Webshop has no reason to have a native app (likely it is a browser wrapper anyway).

However, being installed puts you right in front of the users noses everytime the unlock the phone. Just look at the discounts that are offered for installing Native apps or shops that are app only to begin with.

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

#276

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)

Support is getting there on the browsers' side, but you need a backend that supports HTTP3+WebTransport - barely any out there

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

#277

Earlier quoted context omitted.

Developing apps on it still seems really, really primitive. HTML alone is not sufficient for a decent looking UI. Tailwind directives gunk it up rapidly. Component frameworks help some but still don’t seem quite as nice as something like SwiftUI. Server side functionality still requires a lot of manual serialization/deserialization (unless you use the newer crop of frameworks that have figured out this is pure noise)…

>HTML alone is not sufficient for a decent looking UI Well that's some nonsense. HTML can absolutely achieve 1:1 on any UI you care to mention. It isn't even difficult if you have any skill at all. >And then there’s JS. And then there's another person who didn't take the time to learn JS and just hates it for reasons . >Rails, htmx, and a few others seem like the only ones who really get that a simple web app should…

> It isn't even difficult if you have any skill at all.

Very constructive, thank you.

I'm talking about the defaults of HTML. There's no pit of success, just lots of div-wrapping and tweaking until things fall into place. Compare with SwiftUI, where you plop two controls and they're spaced sensibly from one another without you doing anything. This was also the case in VB6.

> And then there's another person who didn't take the time to learn JS and just hates it for reasons.

I've been writing TS for awhile now, it's mostly fine. Should've expanded further: npm is a bit of a madhouse, and JS culture basically consists of "we shove JS everywhere we can and say it is good because it is JS."

> Show me a native app with a polished UI and any useful functionality in only 50-100loc.

I'll concede that. At 50-100loc, you can have a decent looking native app for a simple task. Presentation layer for a webapp blows through that immediately. Some of that is accepting the medium as is and learning to work with it. Some of it is also the fundamental impedance mismatch of the web writ documents/apps.

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

#279

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…

First the needs of the user-base should trump those of the dev. And secondly the kinds of apps that are referred to here are not the type that need massive efficiency or some complex feature - when inconvenienced by yet another single-use car park payment app, I've never once thought how marvellous it was that the text downloaded so much faster than the many web sites I regularly use: mainly because that responsivene…

You forgot constant 100MB updates, which are just one page refresh on web.

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

#280

Earlier quoted context omitted.

I have learned JS & used it extensively in many projects. Including modern SPAs. And I absolutely despise it & wish I could use something like recently trendy GO or RUST. JS has absolutely no rhyme or reason, single threaded nature makes it gunk up browsers crazy quickly & the insane bloat of "frameworks", which attempt to completely replace already great APIs, while working on top of them... IS CRAZY!

>JS has absolutely no rhyme or reason That's really false. The type coercion matrix does make sense for the job it is supposed to accomplish, even if you personally don't agree with it for whatever your reasons are. https://media.geeksforgeeks.org/wp-content/uploads/advanced-... If you haven't seen the info presented like this before, then I can understand why Javascript might seem "CRAZY" after reading so many blog…

> about a billion blog posts on medium.com.

Are you trying to sell JS or not? :)

> When I started with Javascript in Netscape in the early 90's, it wasn't as well documented and well supported as it is today. That version of Javascript was a bit rough around the edges

Best bug I saw there was how it would sometimes just...give up on running JS if you held it wrong (probably a Netscape thing) and you had to figure out why.

> I'm using Preact for my embedded IoT front-end and the complex web app it compiles is less than 50KB total gzipped. Bloat is a choice, not a requirement.

50KB sent to the client in total? What UI libraries do you use? Happy to try out things; I'm currently a fan of Svelte but haven't tried Preact yet.

Post reply on HN